Skip to content
Snippets Groups Projects
Commit 4c0fd15f authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot
Browse files

ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders

Part-of: <!976>
parent 6b3dedda
No related branches found
No related tags found
1 merge request!976ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders
Pipeline #1326580 passed
......@@ -128,7 +128,6 @@ piglit_init(int argc, char **argv)
for (i = 0; i < num_uniforms_used; i++) {
GLint ref_vs = 0, ref_gs = 0, ref_fs = 0;
bool block_fail = false;
glGetActiveUniformBlockName(prog, i, sizeof(name), NULL, name);
......@@ -150,16 +149,10 @@ piglit_init(int argc, char **argv)
printf("%10s: %d %d", name, ref_vs, ref_fs);
}
if ((strstr(name, "vs") != 0) != ref_vs)
block_fail = true;
if (use_gs) {
if ((strstr(name, "gs") != 0) != ref_gs)
block_fail = true;
}
if ((strstr(name, "fs") != 0) != ref_fs)
block_fail = true;
if (block_fail) {
/* The shader compiler can move UBOs between shaders, so we can't expect them
* to be where we declared them.
*/
if (!ref_vs && !ref_gs && !ref_fs) {
printf(" FAIL");
pass = false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment