mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-16 15:27:11 -05:00
VideoBackends/OGL: Don't call glMemoryBarrier without ARB_shader_image_load_store
glMemoryBarrier comes from ARB_shader_image_load_store, so on a desktop context below GL 4.2 the pointer is null. bSupportsBBox is set from bSupportsFragmentStoresAndAtomics, which such a driver can still have, so saving a state reads the bounding box and calls a null pointer. UsePersistentStagingBuffers() in OGLTexture.cpp already guards the same call with bSupportsImageLoadStore.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "VideoBackends/OGL/OGLConfig.h"
|
||||
#include "VideoBackends/OGL/OGLGfx.h"
|
||||
#include "VideoCommon/DriverDetails.h"
|
||||
|
||||
@@ -37,7 +38,7 @@ std::vector<BBoxType> OGLBoundingBox::Read(u32 index, u32 length)
|
||||
// on nVidia drivers. This is more noticeable at higher internal resolutions.
|
||||
// Using glGetBufferSubData instead does not seem to exhibit this slowdown.
|
||||
if (!DriverDetails::HasBug(DriverDetails::BUG_SLOW_GETBUFFERSUBDATA) &&
|
||||
!static_cast<OGLGfx*>(g_gfx.get())->IsGLES())
|
||||
!static_cast<OGLGfx*>(g_gfx.get())->IsGLES() && g_ogl_config.bSupportsImageLoadStore)
|
||||
{
|
||||
// We also need to ensure the the CPU does not receive stale values which have been updated by
|
||||
// the GPU. Apparently the buffer here is not coherent on NVIDIA drivers. Not sure if this is a
|
||||
|
||||
Reference in New Issue
Block a user