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:
Niklas Haas 2020-06-06 02:19:32 +02:00
parent 8a725ec951
commit 03171b19a9
1 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) 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);
}
}
}