Free performance for AMD+Linux. Instead of disabling BaseVertex due to 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.

This commit is contained in:
Ryan Houdek 2013-12-28 08:00:44 -06:00
parent 935e1fdf99
commit a5bfdbf6cd
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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;