Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Free performance for AMD+Linux. Instead of disabling BaseVertex due t…
…o pinned_memory. Just disable pinned_memory for the ELEMENT_ARRAY_BUFFER type which has issues with baseVertex(ELEMENT_ARRAY_BUFFER)+pinned_memory. In my two tests with this, I went from 5FPS to 11FPS in one test, and 2FPS to 6FPS in another.
  • Loading branch information
Sonicadvance1 committed Dec 28, 2013
1 parent 935e1fd commit a5bfdbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Source/Core/VideoBackends/OGL/Src/Render.cpp
Expand Up @@ -472,8 +472,7 @@ Renderer::Renderer()
g_ogl_config.bSupportsGLSLCache = TO_BOOL(GLEW_ARB_get_program_binary);
g_ogl_config.bSupportsGLPinnedMemory = TO_BOOL(GLEW_AMD_pinned_memory);
g_ogl_config.bSupportsGLSync = TO_BOOL(GLEW_ARB_sync);
g_ogl_config.bSupportsGLBaseVertex = TO_BOOL(GLEW_ARB_draw_elements_base_vertex) &&
!DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY);
g_ogl_config.bSupportsGLBaseVertex = TO_BOOL(GLEW_ARB_draw_elements_base_vertex);
g_ogl_config.bSupportCoverageMSAA = TO_BOOL(GLEW_NV_framebuffer_multisample_coverage);
g_ogl_config.bSupportSampleShading = TO_BOOL(GLEW_ARB_sample_shading);
g_ogl_config.bSupportOGL31 = TO_BOOL(GLEW_VERSION_3_1);
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/VideoBackends/OGL/Src/StreamBuffer.cpp
Expand Up @@ -40,7 +40,9 @@ 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 && (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

0 comments on commit a5bfdbf

Please sign in to comment.