mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
default upload method for nvidia is buffersubdata
This commit is contained in:
parent
bed29f843f
commit
9332775b68
@ -15,7 +15,6 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "GLUtil.h"
|
#include "GLUtil.h"
|
||||||
#include "StreamBuffer.h"
|
#include "StreamBuffer.h"
|
||||||
@ -36,12 +35,16 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
|
|||||||
{
|
{
|
||||||
glGenBuffers(1, &m_buffer);
|
glGenBuffers(1, &m_buffer);
|
||||||
|
|
||||||
|
bool nvidia = !strcmp((const char*)glGetString(GL_VENDOR), "NVIDIA Corporation");
|
||||||
|
|
||||||
if(m_uploadtype == STREAM_DETECT)
|
if(m_uploadtype == STREAM_DETECT)
|
||||||
{
|
{
|
||||||
if(g_Config.backend_info.bSupportsGLSync && g_Config.backend_info.bSupportsGLPinnedMemory)
|
if(g_Config.backend_info.bSupportsGLSync && g_Config.backend_info.bSupportsGLPinnedMemory)
|
||||||
m_uploadtype = PINNED_MEMORY;
|
m_uploadtype = PINNED_MEMORY;
|
||||||
else if(g_Config.backend_info.bSupportsGLSync && g_Config.bHackedBufferUpload)
|
else if(g_Config.backend_info.bSupportsGLSync && g_Config.bHackedBufferUpload)
|
||||||
m_uploadtype = MAP_AND_RISK;
|
m_uploadtype = MAP_AND_RISK;
|
||||||
|
else if(nvidia)
|
||||||
|
m_uploadtype = BUFFERSUBDATA;
|
||||||
else if(g_Config.backend_info.bSupportsGLSync)
|
else if(g_Config.backend_info.bSupportsGLSync)
|
||||||
m_uploadtype = MAP_AND_SYNC;
|
m_uploadtype = MAP_AND_SYNC;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user