From c7fe4ae73ad5f073bbffe3e8a3460b728e7d0f46 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 10 Jun 2020 17:16:43 +0200 Subject: vo_gpu: move coherent specifier to the correct location glslang accepted this, perhaps erronneously, but mesa does not. It seems to be incorrect. A caveat is that this means *all* SSBOs are now coherent, but since we only use SSBOs for peak detection, that's a non-issue. (And besides, marking something as coherent when we don't perform any synchronization commands on it should be a no-op anyway) Fixes #7823 --- video/out/gpu/shader_cache.c | 2 +- video/out/gpu/video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c index f05d8dc791..fb80e1bbff 100644 --- a/video/out/gpu/shader_cache.c +++ b/video/out/gpu/shader_cache.c @@ -695,7 +695,7 @@ static void add_uniforms(struct gl_shader_cache *sc, bstr *dst) u->input.binding, u->input.name, u->buffer_format); break; case RA_VARTYPE_BUF_RW: - ADD(dst, "layout(std430, binding=%d) restrict buffer %s { %s };\n", + ADD(dst, "layout(std430, binding=%d) restrict coherent buffer %s { %s };\n", u->input.binding, u->input.name, u->buffer_format); break; case RA_VARTYPE_IMG_W: { diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 74ff85f210..500ec6af22 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -2636,7 +2636,7 @@ static void pass_colormanage(struct gl_video *p, struct mp_colorspace src, if (detect_peak) { pass_describe(p, "detect HDR peak"); pass_is_compute(p, 8, 8, true); // 8x8 is good for performance - gl_sc_ssbo(p->sc, "coherent PeakDetect", p->hdr_peak_ssbo, + gl_sc_ssbo(p->sc, "PeakDetect", p->hdr_peak_ssbo, "vec2 average;" "int frame_sum;" "uint frame_max;" -- cgit v1.2.3