[Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
Ian Romanick
idr at freedesktop.org
Tue Oct 6 13:40:28 PDT 2015
On 10/05/2015 07:25 PM, Matt Turner wrote:
> On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> The rules changed from GLSL ES 1.00 to GLSL ES 3.00, so the two tests
>> expect opposite results.
>>
>> NOTE: Mesa currently fails
>> tests/spec/glsl-es-3.00/compiler/constant-sequence.vert and the related
>> GLES3 conformance test.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> Cc: Tapani Pälli <tapani.palli at intel.com>
>> Cc: Mark Janes <mark.a.janes at intel.com>
>> Cc: Marta Lofstedt <marta.lofstedt at intel.com>
>> ---
>> .../glsl-es-1.00/compiler/constant-sequence.vert | 17 +++++++++++++++++
>> .../glsl-es-3.00/compiler/constant-sequence.vert | 21 +++++++++++++++++++++
>> 2 files changed, 38 insertions(+)
>> create mode 100644 tests/spec/glsl-es-1.00/compiler/constant-sequence.vert
>> create mode 100644 tests/spec/glsl-es-3.00/compiler/constant-sequence.vert
>>
>> diff --git a/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert
>> new file mode 100644
>> index 0000000..f57707b
>> --- /dev/null
>> +++ b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert
>> @@ -0,0 +1,17 @@
>> +#version 100
>> +
>> +/* [config]
>> + * expect_result: pass
>> + * glsl_version: 1.00
>> + * [end config]
>> + *
>> + * While the sequnece operator is specifically disallowed as a constant
>> + * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00.
>
> Yay! More pointless differences that don't actually save anyone any
> work since your compiler has to accept both #versions!
Well... GLSL 4.30 has the same restriction. Part of the problem was
that, I believe, not all compilers actually supported sequence as
constant expressions, and allowing it means you have to support
vec4 foo[3, 4];
to declare 4 element array... which is both insane and illegal in C.
> Also typo: sequence
R-b with that fixed? :)
More information about the Piglit
mailing list