Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On Tue, Oct 6, 2015 at 1:40 PM, Ian Romanick wrote: > On 10/05/2015 07:25 PM, Matt Turner wrote: >> On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> 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 >>> Cc: Tapani Pälli >>> Cc: Mark Janes >>> Cc: Marta Lofstedt >>> --- >>> .../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 000..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? :) Sure, Reviewed-by: Matt Turner (sorry, I wasn't meaning to review, just to complain :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On 10/05/2015 07:25 PM, Matt Turner wrote: > On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> 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 >> Cc: Tapani Pälli >> Cc: Mark Janes >> Cc: Marta Lofstedt >> --- >> .../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 000..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? :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick wrote: > From: Ian Romanick > > 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 > Cc: Tapani Pälli > Cc: Mark Janes > Cc: Marta Lofstedt > --- > .../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 000..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! Also typo: sequence ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
From: Ian Romanick 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 Cc: Tapani Pälli Cc: Mark Janes Cc: Marta Lofstedt --- .../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 000..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. + */ + +const float f = (1.0, 2.0); + +void main() +{ +gl_Position = vec4(f); +} diff --git a/tests/spec/glsl-es-3.00/compiler/constant-sequence.vert b/tests/spec/glsl-es-3.00/compiler/constant-sequence.vert new file mode 100644 index 000..260e8ef --- /dev/null +++ b/tests/spec/glsl-es-3.00/compiler/constant-sequence.vert @@ -0,0 +1,21 @@ +#version 300 es + +/* [config] + * expect_result: fail + * glsl_version: 3.00 + * [end config] + * + * Section 4.3.3 "Constant Expressions" of the OpenGL GLSL ES 3.00.4 spec + * says: + * + * "However, the sequence operator ( , ) and the assignment operators ( =, + * +=, ...) are not included in the operators that can create a constant + * expression." + */ + +const float f = (1.0, 2.0); + +void main() +{ +gl_Position = vec4(f); +} -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit