[Piglit] [PATCH 1/3] ARB_explicit_uniform_location: preprocessor define test

Tapani Pälli tapani.palli at intel.com
Wed Mar 12 04:22:26 PDT 2014


Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 tests/all.py                                          |  7 +++++++
 .../preprocessor/define.frag                          | 19 +++++++++++++++++++
 .../preprocessor/define.vert                          | 19 +++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
 create mode 100644 tests/spec/arb_explicit_uniform_location/preprocessor/define.vert

diff --git a/tests/all.py b/tests/all.py
index d6daed2..1660d57 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1917,6 +1917,13 @@ add_plain_test(arb_explicit_attrib_location, 'glsl-explicit-location-03')
 add_plain_test(arb_explicit_attrib_location, 'glsl-explicit-location-04')
 add_plain_test(arb_explicit_attrib_location, 'glsl-explicit-location-05')
 
+# Group ARB_explicit_uniform_location
+arb_explicit_uniform_location = Group()
+spec['ARB_explicit_uniform_location'] = arb_explicit_uniform_location
+import_glsl_parser_tests(arb_explicit_uniform_location,
+                         os.path.join(testsDir, 'spec', 'arb_explicit_uniform_location'),
+                         [''])
+
 arb_texture_buffer_object = Group()
 spec['ARB_texture_buffer_object'] = arb_texture_buffer_object
 arb_texture_buffer_object['data-sync'] = concurrent_test('arb_texture_buffer_object-data-sync')
diff --git a/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag b/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
new file mode 100644
index 0000000..bd35c41
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_explicit_uniform_location
+// [end config]
+
+#version 110
+#extension GL_ARB_explicit_uniform_location: require
+
+#if !defined GL_ARB_explicit_uniform_location
+#  error GL_ARB_explicit_uniform_location is not defined
+#elif GL_ARB_explicit_uniform_location != 1
+#  error GL_ARB_explicit_uniform_location is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
diff --git a/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert b/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert
new file mode 100644
index 0000000..bd35c41
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_explicit_uniform_location
+// [end config]
+
+#version 110
+#extension GL_ARB_explicit_uniform_location: require
+
+#if !defined GL_ARB_explicit_uniform_location
+#  error GL_ARB_explicit_uniform_location is not defined
+#elif GL_ARB_explicit_uniform_location != 1
+#  error GL_ARB_explicit_uniform_location is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
-- 
1.8.5.3



More information about the Piglit mailing list