[Piglit] [PATCH 3/5] array-size-sequence-in-parenthesis: Invert expected result.
Matt Turner
mattst88 at gmail.com
Thu May 16 14:38:00 PDT 2013
On Thu, May 2, 2013 at 1:17 PM, Fabian Bieler <fabianbieler at fastmail.fm> wrote:
> The test incorectly stated that (5, 3) is not a grammatically correct
> constant_expression.
>
> According to the GLSL 1.20 spec this is possible like so:
>
> constant_expression:
> conditional_expression: <---------------------------------------+
> [a bunch of logical & arithmetic binary expressions]: |
> unary_expression: |
> postfix_expression: |
> primary_expression: |
> '(' expression ')' ------+ |
> INTCONSTANT | |
> | |
> +----------------------------------------------+ |
> | |
> V |
> expression: |
> assignment_expression |
> expression ',' assignment_expression |
> |
> assignment_expression: |
> conditional_expression ----------------------------------------+
>
> Invert expected result of test and check that correct operand of comma
> operator is discarded.
> ---
> .../array-size-sequence-in-parenthesis.vert | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
> index 8f3d42f..4fedd3f 100644
> --- a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
> +++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
> @@ -1,5 +1,5 @@
> /* [config]
> - * expect_result: fail
> + * expect_result: pass
> * glsl_version: 1.20
> * [end config]
> *
> @@ -27,6 +27,6 @@
> */
> #version 120
>
> -uniform float a[(5,3)];
> +uniform float a[(3,5)];
>
> -void main() { gl_Position = vec4(0.0); }
> +void main() { gl_Position = vec4(a[4]); }
> --
> 1.8.1.2
Nice find.
Reviewed-by: Matt Turner <mattst88 at gmail.com>
I don't think I can adequately review the triangle rasterization and
sparse-samplers tests.
More information about the Piglit
mailing list