summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-07-25 06:11:57 +0200
committerNiklas Haas <git@haasn.xyz>2017-07-25 06:11:57 +0200
commitd099e037efa2ceaff96c775f5c6f8d1e74650b76 (patch)
treefbb93b8c17ccd461d3a36527c27449def975fa9e /video/out
parent6c06e7e2a03f90310afc079bb812e9e26b49ed38 (diff)
downloadmpv-d099e037efa2ceaff96c775f5c6f8d1e74650b76.tar.bz2
mpv-d099e037efa2ceaff96c775f5c6f8d1e74650b76.tar.xz
vo_opengl: fix incoherent SSBO usage
According to the OpenGL spec, atomic access to SSBO variables is *not* guaranteed to be coherent, even when reusing the same SSBO attached to the same shader across different frames. So we actually need a glMemoryBarrier here, at least in theory.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 5d94a62b2f..d1edfa02fb 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -2476,6 +2476,7 @@ static void pass_colormanage(struct gl_video *p, struct mp_colorspace src, bool
gl->BindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
}
+ gl->MemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
gl_sc_ssbo(p->sc, "PeakDetect", p->hdr_peak_ssbo,
"uint sig_peak_raw;"
"uint index;"