mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
vo_gpu: make storage images/buffers as restrict
This informs the GPU that we don't alias it with any other descriptors (which we don't).
This commit is contained in:
parent
8a725ec951
commit
03171b19a9
@ -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) buffer %s { %s };\n",
|
||||
ADD(dst, "layout(std430, binding=%d) restrict buffer %s { %s };\n",
|
||||
u->input.binding, u->input.name, u->buffer_format);
|
||||
break;
|
||||
case RA_VARTYPE_IMG_W: {
|
||||
@ -712,7 +712,7 @@ static void add_uniforms(struct gl_shader_cache *sc, bstr *dst)
|
||||
} else if (fmt) {
|
||||
ADD(dst, "layout(%s) ", fmt);
|
||||
}
|
||||
ADD(dst, "uniform %s %s;\n", u->glsl_type, u->input.name);
|
||||
ADD(dst, "uniform restrict %s %s;\n", u->glsl_type, u->input.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user