From e7a8d3f854825fbcbf70c89905fae8d035fe8598 Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 6 Feb 2013 01:05:19 +0100 Subject: [PATCH] check for GL_ARB_sync, it's in ogl 3.2 --- Source/Core/VideoCommon/Src/VideoConfig.h | 1 + Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 2 ++ Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h index 886ed15311..84a2321103 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.h +++ b/Source/Core/VideoCommon/Src/VideoConfig.h @@ -165,6 +165,7 @@ struct VideoConfig bool bSupportsGLSLUBO; bool bSupportsGLSLCache; bool bSupportsGLPinnedMemory; + bool bSupportsGLSync; } backend_info; // Utility diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index a319fa6301..46b085670b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -309,6 +309,8 @@ Renderer::Renderer() g_Config.backend_info.bSupportsGLPinnedMemory = GLEW_AMD_pinned_memory; + g_Config.backend_info.bSupportsGLSync = GLEW_ARB_sync; + //TODO: revert this after cache is fixed itself g_Config.backend_info.bSupportsGLSLCache = false; // GLEW_ARB_get_program_binary diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp index 1f4f8f50b0..dd9d59224a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp @@ -38,10 +38,12 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType) if(m_uploadtype == STREAM_DETECT) { - if(g_Config.backend_info.bSupportsGLPinnedMemory) + if(g_Config.backend_info.bSupportsGLPinnedMemory && g_Config.backend_info.bSupportsGLSync) m_uploadtype = PINNED_MEMORY; - else + else if(g_Config.backend_info.bSupportsGLSync) m_uploadtype = MAP_AND_RISK; + else + m_uploadtype = MAP_AND_ORPHAN; } Init();