[Piglit] [PATCH] arb_uniform_buffer: Fix block / field names in dlist test
Ian Romanick
idr at freedesktop.org
Fri Dec 14 11:24:58 PST 2012
From: Ian Romanick <ian.d.romanick at intel.com>
Both the block name and the names of the individual variables in the
block live at global scope. Therefore, they can't both have the same
names. The GLSL 1.40 spec says:
"Uniform block names and variable names declared within uniform
blocks are scoped at the program level."
Previously this test failed on NVIDIA's closed-source driver (version
304.64) with the error messages:
0(2) : error C1002: the name "a" is already defined at 0(2)
0(3) : error C1002: the name "b" is already defined at 0(3)
With this change, the test passes.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
tests/spec/arb_uniform_buffer_object/dlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/spec/arb_uniform_buffer_object/dlist.c b/tests/spec/arb_uniform_buffer_object/dlist.c
index 0b440ca..1d101a9 100644
--- a/tests/spec/arb_uniform_buffer_object/dlist.c
+++ b/tests/spec/arb_uniform_buffer_object/dlist.c
@@ -66,8 +66,8 @@ PIGLIT_GL_TEST_CONFIG_END
const char *source =
"#extension GL_ARB_uniform_buffer_object : enable\n"
- "uniform a { float a; };\n"
- "uniform b { float b; };\n"
+ "uniform A { float a; };\n"
+ "uniform B { float b; };\n"
"void main() {\n"
" gl_FragColor = vec4(a);\n"
"}\n";
--
1.7.11.7
More information about the Piglit
mailing list