summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp
diff options
context:
space:
mode:
authorAndy1210 <andy1210@gmail.com>2026-08-07 17:09:46 +0200
committerAndy1210 <andy1210@gmail.com>2026-08-07 17:09:46 +0200
commit21ace5616039116c6d34cbc7bdccffdce67d6aff (patch)
treee7d5d31e2aa44b4120f287c1fb91795b03d073ae /Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp
parent430138f468effe6bf396adf3cd4d46df4cbd9050 (diff)
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.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp b/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp
index 673e308d53..19b3d0197f 100644
--- a/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLBoundingBox.cpp
@@ -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