diff options
author | Chad Versace <chad.versace@intel.com> | 2010-11-11 08:26:50 -0800 |
---|---|---|
committer | Chad Versace <chad.versace@intel.com> | 2010-12-01 14:21:21 -0800 |
commit | d538f31bab1f6f0ac0b98d3bc34de5df6ca901d3 (patch) | |
tree | f63494dabe71572160bf248b120ef5135aefd46a /examples | |
parent | eb0c27960ec46033d80dceebec18e65cfae273c8 (diff) |
examples: Add example test files for GLSLParserTest
Class GLSLParserTest is added in a future commit.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/glsl_parser_test/ReadMe.txt | 3 | ||||
-rw-r--r-- | examples/glsl_parser_test/bit-logic-assign.frag | 21 | ||||
-rw-r--r-- | examples/glsl_parser_test/bit-logic.vert | 18 |
3 files changed, 42 insertions, 0 deletions
diff --git a/examples/glsl_parser_test/ReadMe.txt b/examples/glsl_parser_test/ReadMe.txt new file mode 100644 index 000000000..21b00a5e6 --- /dev/null +++ b/examples/glsl_parser_test/ReadMe.txt @@ -0,0 +1,3 @@ +This directory holds example test files that can be registered with Piglit +with ``add_glsl_parser_test()``. For a decription of the the test's +behavior and file format, see the docstrings in file glsl_parser_test.py. diff --git a/examples/glsl_parser_test/bit-logic-assign.frag b/examples/glsl_parser_test/bit-logic-assign.frag new file mode 100644 index 000000000..78eff0f4d --- /dev/null +++ b/examples/glsl_parser_test/bit-logic-assign.frag @@ -0,0 +1,21 @@ +// The config section below is required. +// +// [config] +// # The config section may contain comments. +// expect_result: pass +// glsl_version: 1.30 +// [end config] +// +// Description: bit-logic assignment ops with argument type (int, int) +// +// From page 50 (page 56 of PDF) of the GLSL 1.30 spec: +// "The operands must be of type signed or unsigned integers or integer +// vectors." + +#version 130 +void main() { + int x = 0; + x &= 1; + x |= 1; + x ^= 1; +} diff --git a/examples/glsl_parser_test/bit-logic.vert b/examples/glsl_parser_test/bit-logic.vert new file mode 100644 index 000000000..9b7ffedd5 --- /dev/null +++ b/examples/glsl_parser_test/bit-logic.vert @@ -0,0 +1,18 @@ +/* The config section below is required. + * + * [config] + * # The config section may contain comments. + * expect_result: fail + * glsl_version: 1.30 + * [end config] + * + * Description: bit-and with argument type (int, uint) + * + * From page 50 (page 56 of PDF) of the GLSL 1.30 spec: + * "The fundamental types of the operands (signed or unsigned) must match" + */ + +#version 130 +void main() { + int x = int(7) & uint(1); +} |