[Piglit] [PATCH 1/2] glsl-3.30: Add a test for __VERSION__ == 330.

Kenneth Graunke kenneth at whitecape.org
Fri Aug 23 11:46:24 PDT 2013


This is copy and pasted from glsl-1.50/compiler/version-macro.frag with
the version changed.

Since this is the first test for GLSL 3.30, this patch also hooks up the
directory so all.tests scans it for parsertests and shader runner tests.
---
 tests/all.tests                                  | 8 ++++++++
 tests/spec/glsl-3.30/compiler/version-macro.frag | 7 +++++++
 2 files changed, 15 insertions(+)
 create mode 100644 tests/spec/glsl-3.30/compiler/version-macro.frag

diff --git a/tests/all.tests b/tests/all.tests
index 0c67beb..af2f684 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -938,6 +938,14 @@ for draw in ['', 'indexed']:
                             ('arb_geometry_shader4-ignore-adjacent-vertices '
                              'core {0} {1}').format(draw, prim))
 
+spec['glsl-3.30'] = Group()
+import_glsl_parser_tests(spec['glsl-3.30'],
+			 os.path.join(testsDir, 'spec', 'glsl-3.30'),
+			 ['compiler'])
+add_shader_test_dir(spec['glsl-3.30'],
+		    os.path.join(testsDir, 'spec', 'glsl-3.30'),
+		    recursive=True)
+
 # Group spec/glsl-es-3.00
 spec['glsl-es-3.00'] = Group()
 import_glsl_parser_tests(spec['glsl-es-3.00'],
diff --git a/tests/spec/glsl-3.30/compiler/version-macro.frag b/tests/spec/glsl-3.30/compiler/version-macro.frag
new file mode 100644
index 0000000..d4107ce
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/version-macro.frag
@@ -0,0 +1,7 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// [end config]
+
+#version 330
+int x[int(__VERSION__ == 330)];
-- 
1.8.3.4



More information about the Piglit mailing list