summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/gl_headers.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-07-25 01:59:54 +0200
committerNiklas Haas <git@haasn.xyz>2017-07-25 05:22:29 +0200
commitcd226bdfd8d417e4316aca6d4e59b32561791f93 (patch)
treead484a329e785f6647e3285555692acfce31a08c /video/out/opengl/gl_headers.h
parent241d5ebc4612041e2731b55b8831d6e7a290cba8 (diff)
downloadmpv-cd226bdfd8d417e4316aca6d4e59b32561791f93.tar.bz2
mpv-cd226bdfd8d417e4316aca6d4e59b32561791f93.tar.xz
vo_opengl: fix incoherent texture usage
This bug slipped past my attention because nvidia ignores memory barriers, but this is not necessarily always the case. Since image_load_store is incoherent (specifically, writing to images from compute shaders is incoherent) we need to insert a memory barrier to make it coherent again. Since we only care about texture fetches, that's the only barrier we need.
Diffstat (limited to 'video/out/opengl/gl_headers.h')
-rw-r--r--video/out/opengl/gl_headers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/opengl/gl_headers.h b/video/out/opengl/gl_headers.h
index a55749cbb7..c764d1fbef 100644
--- a/video/out/opengl/gl_headers.h
+++ b/video/out/opengl/gl_headers.h
@@ -79,6 +79,10 @@
#define GL_DYNAMIC_STORAGE_BIT 0x0100
#define GL_CLIENT_STORAGE_BIT 0x0200
+// --- GL 4.2 or GL_ARB_image_load_store
+
+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
+
// -- GL 4.3 or GL_ARB_compute_shader
#define GL_COMPUTE_SHADER 0x91B9