1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-01 04:12:25 +00:00

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
This commit is contained in:
Niklas Haas 2020-06-10 17:16:43 +02:00
parent 44ad00ba10
commit c7fe4ae73a
2 changed files with 2 additions and 2 deletions

View File

@ -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: {

View File

@ -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;"