mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ogl driverdetails: add flag to disable hacked and pinned memory
pinned memory is broken for index buffers hacked buffer crashes the amd driver
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include "StreamBuffer.h"
|
||||
#include "MemoryUtil.h"
|
||||
#include "Render.h"
|
||||
#include "DriverDetails.h"
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
@ -27,9 +28,9 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
|
||||
m_uploadtype = BUFFERDATA;
|
||||
else if(!g_ogl_config.bSupportsGLBaseVertex && (m_uploadtype & BUFFERSUBDATA))
|
||||
m_uploadtype = BUFFERSUBDATA;
|
||||
else if(g_ogl_config.bSupportsGLSync && g_Config.bHackedBufferUpload && (m_uploadtype & MAP_AND_RISK))
|
||||
else if(g_ogl_config.bSupportsGLSync && g_Config.bHackedBufferUpload && !DriverDetails::HasBug(DriverDetails::BUG_BROKENHACKEDBUFFER) && (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;
|
||||
|
Reference in New Issue
Block a user