[Piglit] [PATCH] arb_program_interface_query: update and fix arrays of arrays tests
Tapani Pälli
tapani.palli at intel.com
Mon Jun 29 03:49:53 PDT 2015
On 06/27/2015 02:14 AM, Timothy Arceri wrote:
> 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.
Did you check if these changes pass on nvidia/amd?
Shouldn't one give 'vs_input2[0]' as parameter? Then it would definitely
qualify because 'vs_input2[0][0]' is ok but having only 'vs_input2'
means name check against 'vs_input2' and 'vs_input2[0]' which would not
qualify (?)
This was my understanding when writing the code. So how I interpret the
spec is that if you have multiple levels, you'll need to specify until
the last level and optionally [0] for that last one.
> 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),
>
More information about the Piglit
mailing list