diff options
author | Niklas Haas <git@haasn.xyz> | 2017-07-25 01:59:54 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-07-25 05:22:29 +0200 |
commit | cd226bdfd8d417e4316aca6d4e59b32561791f93 (patch) | |
tree | ad484a329e785f6647e3285555692acfce31a08c /video/out/opengl/video.c | |
parent | 241d5ebc4612041e2731b55b8831d6e7a290cba8 (diff) | |
download | mpv-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/video.c')
-rw-r--r-- | video/out/opengl/video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index d0efcd067d..5d94a62b2f 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1274,6 +1274,7 @@ static void finish_pass_fbo(struct gl_video *p, struct fbotex *dst_fbo, dst_fbo->iformat, GL_WRITE_ONLY); GLSL(imageStore(out_image, ivec2(gl_GlobalInvocationID), color);) dispatch_compute(p, w, h, p->compute_w, p->compute_h); + p->gl->MemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); } else { finish_pass_direct(p, dst_fbo->fbo, dst_fbo->rw, dst_fbo->rh, &(struct mp_rect){0, 0, w, h}); |