summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-3.00/compiler
AgeCommit message (Collapse)AuthorFilesLines
2015-10-13glsl-es: Verify rules about constant expressions w.r.t. sizing arraysIan Romanick2-0/+42
NOTE: Without patches recently posted to the mesa-dev mailing list, Mesa fails spec/glsl-es-3.00/compiler/array-sized-by-sequence.*. v2: Fix #version line in spec/glsl-es-1.00/compiler/array-sized-by-sequence-in-parenthesis.vert. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-13glsl-es: Additional constant initializer tests.Ian Romanick4-0/+76
Most built-in functions with constant-expression parameters are also constant expressions. GLSL ES 1.00 and 3.00 differ as to whether or not the sequence operator is a constant expression. Note: spec/glsl-es-1.00/compiler/const-initializer/from-function.* and spec/glsl-es-1.00/compiler/const-initializer/from-sequence-in-function.* currently fail on Mesa. This is very confusing because the nearly identical spec/glsl-es-3.00/compiler/const-initializer/from-function.* tests both pass! Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-13glsl-es: Verify restrictions on global variable initializersIan Romanick10-0/+279
Section 4.3 (Storage Qualifiers) of the OpenGL ES 1.00.17 spec says: "Declarations of globals without a storage qualifier, or with just the const qualifier, may include initializers, in which case they will be initialized before the first line of main() is executed. Such initializers must be a constant expression." The GLSL ES 3.00.4 spec has similar language. Desktop GLSL does not restrict initializers for global variables. Now it's okay for Matt to be irritated. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92304 Reviewed-by: Mark Janes <mark.a.janes@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com> Cc: Tapani Pälli <tapani.palli@intel.com> Cc: Mark Janes <mark.a.janes@intel.com> Cc: Marta Lofstedt <marta.lofstedt@intel.com>
2015-10-07glsl-es: Test whether or not sequence can be a constant expressionIan Romanick2-0/+42
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. v2: s/sequnece/sequence/ noticed by Matt. v3: Move tests into const-initializer subdirectories. Add tests with more complex use of sequence operator. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> [v2] Cc: Tapani Pälli <tapani.palli@intel.com> Cc: Mark Janes <mark.a.janes@intel.com> Cc: Marta Lofstedt <marta.lofstedt@intel.com>
2014-11-10glsl-es-3.00: test for 'invariant(all)' usage in a fragment shaderTapani Pälli1-0/+24
This test fails on the current Mesa driver. v2: add spec citation (Ian Romanick) v3: move #version directive (Dylan) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-19glsl-es-3.00: Verify that predefined macros cannot be undefinedIan Romanick4-0/+68
Section 3.4 (Preprocessor) of the OpenGL ES Shading Language 3.00 spec says: "It is an error to undefine or to redefine a built-in (pre-defined) macro name." NOTE: These tests currently fail on Mesa. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-07Add a GLSL ES 3.00 compiler test for chained qualifiers.Kenneth Graunke1-0/+7
Mesa had a bug where using an "auxiliary storage qualifier" (to use the 420pack terminology) such as "centroid" would lose any precision qualifiers. This simple test trips that bug. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reported-by: Kevin Rogovin <kevin.rogovin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-09-04glsl: Add precision qualifier tests for sampler types in GLSL and GLSL ESAnuj Phogat2-0/+99
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-08-29glsl: Add new __VERSION__ tests for GLSL 1.10-1.40 and ES 1.00/3.00.Kenneth Graunke1-0/+14
These follow the pattern of the 1.50 and 3.30 tests. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-07-11glsl-es-3.00: Test that row_major is not a reserved word.Matt Turner1-0/+14
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2013-02-15GLSL ES: Verify that fragment shaders have no default float precision.Paul Berry1-0/+21
Tested on the nVidia proprietary driver for Linux. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60737 Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-13Modify tests for error checking on "flat" keyword to match updated specs.Paul Berry10-0/+221
All of the GLSL specs from GLSL 1.30 (and GLSL ES 3.00) onward contain language requiring certain integer variables to be declared with the "flat" keyword, but they differ in exactly *when* the rule is enforced: (a) GLSL 1.30 and 1.40 say that vertex shader outputs having integral type must be declared as "flat". There is no restriction on fragment shader inputs. (b) GLSL 1.50 through 4.30 say that fragment shader inputs having integral type must be declared as "flat". There is no restriction on vertex shader outputs. (c) GLSL ES 3.00 says that both vertex shader outputs and fragment shader inputs having integral type must be declared as "flat". Previously, Piglit simply checked for behaviour (a). This patch makes it check for behaviour (b) in desktop GL and behaviour (c) in GLES. Rationale: once geometry shader support is included, (b) is the only sensible choice, because it requires "flat" in just the situations where it matters. Since many implementations extend geometry shader support back before GLSL 1.50 (via ARB_geometry_shader4), it seems sensible to regard the difference between (a) and (b) as a bug fix rather than a deliberate behavioural difference, and therefore test for behaviour (b) even in GLSL 1.30. Some discussion about this has already happened on the Mesa-dev list. See: http://lists.freedesktop.org/archives/mesa-dev/2013-February/034199.html Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2013-02-13GLES3: test that non-flat varying structs cannot contain ints.Paul Berry4-0/+116
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2013-02-13Test default precision qualifiers for samplers in GLSL ES.Paul Berry2-0/+83
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-12-11glsl-es-3.00: Verify serveral cases of uniform blocks w/instance namesIan Romanick10-0/+279
Each specific test contains justification in a header comment block. So far, these are only compiler tests. Execution tests will follow eventually. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-12-04glsl-es-3.00: Add UTF-8 related testsIan Romanick3-0/+108
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-12-04glsl-es-3.00: Verify that use of undefined macros is an errorIan Romanick1-0/+21
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-12-04glsl-es-3.00: Add test for line continuationIan Romanick1-0/+27
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-12-04glsl-es-3.00: Check array sizing rules in GLSL ES 3.00.Ian Romanick3-0/+75
Mesa currently fails array-sized-by-initializer.vert. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-11-26glsl-es-3.00: Verify that .length() returns a constant expressionIan Romanick1-0/+28
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-26glsl-es-3.00: Verify that .length() returns a signed integerIan Romanick3-0/+81
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-26glsl-es-3.00: Verify that no statment is allowed before the first case in a ↵Ian Romanick1-0/+24
switch Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>