From 9332775b681abcd505abac36e3fa16b51167b684 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 21 Feb 2013 21:59:40 +0100 Subject: [PATCH] default upload method for nvidia is buffersubdata --- Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp index 5938b0ec4b..52da0ea338 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ - #include "Globals.h" #include "GLUtil.h" #include "StreamBuffer.h" @@ -36,12 +35,16 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType) { glGenBuffers(1, &m_buffer); + bool nvidia = !strcmp((const char*)glGetString(GL_VENDOR), "NVIDIA Corporation"); + if(m_uploadtype == STREAM_DETECT) { if(g_Config.backend_info.bSupportsGLSync && g_Config.backend_info.bSupportsGLPinnedMemory) m_uploadtype = PINNED_MEMORY; else if(g_Config.backend_info.bSupportsGLSync && g_Config.bHackedBufferUpload) m_uploadtype = MAP_AND_RISK; + else if(nvidia) + m_uploadtype = BUFFERSUBDATA; else if(g_Config.backend_info.bSupportsGLSync) m_uploadtype = MAP_AND_SYNC; else