[Piglit] [PATCH] arb_program_interface_query: update and fix arrays of arrays tests
Timothy Arceri
t_arceri at yahoo.com.au
Fri Jun 26 16:14:14 PDT 2015
Add a 3D array test and fix the expected result for an array without
a subscript attached to the name.
The arb_program_interface_query spec says:
"If <name> exactly matches the name string of one of the active resources
for <programInterface>, the index of the matched resource is returned.
Additionally, if <name> would exactly match the name string of an active
resource if "[0]" were appended to <name>, the index of the matched
resource is returned."
So the index should not be INVALID_INDEX when there is no subscript.
Cc: Martin Peres <martin.peres at linux.intel.com>
Cc: Tapani Pälli <tapani.palli at intel.com>
---
.../arb_program_interface_query/getprogramresourceindex.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/spec/arb_program_interface_query/getprogramresourceindex.c b/tests/spec/arb_program_interface_query/getprogramresourceindex.c
index 889b5e1..18bb1af 100755
--- a/tests/spec/arb_program_interface_query/getprogramresourceindex.c
+++ b/tests/spec/arb_program_interface_query/getprogramresourceindex.c
@@ -170,11 +170,21 @@ static const struct subtest_index_t index_subtests[] = {
ST(vs_array, GL_UNIFORM, "sa[0].world", 0, GL_NO_ERROR),
ST(vs_array, GL_UNIFORM, "sa[0].world[0]", 0, GL_NO_ERROR),
ST(vs_array, GL_UNIFORM, "sa[1].hello", -1, GL_NO_ERROR),
- ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2", 0, GL_NO_ERROR),
ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2[0]", 0, GL_NO_ERROR),
ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2[0][0]", 0, GL_NO_ERROR),
ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2[1][0]", -1, GL_NO_ERROR),
ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input2[0][1]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3", 0, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[0]", 0, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[0][0]", 0, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[0][0][0]", 0, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[0][0][1]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[0][1][0]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[1][0][0]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[1][0][1]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[1][1][0]", -1, GL_NO_ERROR),
+ ST( vs_aofa, GL_PROGRAM_INPUT, "vs_input3[1][1][1]", -1, GL_NO_ERROR),
ST( vs_sub, GL_VERTEX_SUBROUTINE, "vss", 0, GL_NO_ERROR),
ST(vs_empty, GL_TRANSFORM_FEEDBACK_VARYING, "gl_NextBuffer", -1, GL_NO_ERROR),
ST(vs_empty, GL_TRANSFORM_FEEDBACK_VARYING, "gl_SkipComponents1", -1, GL_NO_ERROR),
--
2.4.3
More information about the Piglit
mailing list