Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
OpenGL: Enable pinned memory even for index buffers (works for me). B…
…ig-ish speedup on AMD GPUs for streaming intensive games.
  • Loading branch information
neobrain committed Nov 22, 2013
1 parent 1763dc2 commit 672fa65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/OGL/Src/StreamBuffer.cpp
Expand Up @@ -40,7 +40,7 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
m_uploadtype = BUFFERDATA;
else if(g_ogl_config.bSupportsGLSync && g_ActiveConfig.bHackedBufferUpload && (m_uploadtype & MAP_AND_RISK))
m_uploadtype = MAP_AND_RISK;
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory && (!DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) || type != GL_ELEMENT_ARRAY_BUFFER) && (m_uploadtype & PINNED_MEMORY))
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory && !(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER) && (m_uploadtype & PINNED_MEMORY))
m_uploadtype = PINNED_MEMORY;
else if(nvidia && (m_uploadtype & BUFFERSUBDATA))
m_uploadtype = BUFFERSUBDATA;
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/Src/DriverDetails.cpp
Expand Up @@ -39,7 +39,6 @@ namespace DriverDetails
{VENDOR_MESA, DRIVER_I965, BUG_BROKENUBO, 900, 920, true},
{VENDOR_ATI, DRIVER_ATI, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
{VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
{VENDOR_ATI, DRIVER_ATI, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
{VENDOR_TEGRA, DRIVER_NVIDIA, BUG_ISTEGRA, -1.0, -1.0, true},
{VENDOR_IMGTEC, DRIVER_IMGTEC, BUG_ISPOWERVR, -1.0, -1.0, true},
};
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/VideoCommon/Src/DriverDetails.h
Expand Up @@ -94,10 +94,11 @@ namespace DriverDetails
// Bug: The pinned memory extension isn't working for index buffers
// Affected devices: AMD as they are the only vendor providing this extension
// Started Version: ?
// Ended Version: -1
// Ended Version: 13.9 working for me (neobrain).
// Pinned memory is disabled for index buffer as the amd driver (the only one with pinned memory support) seems
// to be broken. We just get flickering/black rendering when using pinned memory here -- degasus - 2013/08/20
// Please see issue #6105 on google code. Let's hope buffer storage solves this issues.
// TODO: Detect broken drivers.
BUG_BROKENPINNEDMEMORY,
// Bug: Entirely broken UBOs
// Affected devices: Qualcomm/Adreno
Expand Down

0 comments on commit 672fa65

Please sign in to comment.