[Piglit] [PATCH 08/15] arb_tessellation_shader: Test glsl preprocessor defines.
Fabian Bieler
fabianbieler at fastmail.fm
Mon Mar 24 15:02:47 PDT 2014
Signed-off-by: Fabian Bieler <fabianbieler at fastmail.fm>
---
tests/all.py | 3 +++
.../spec/arb_tessellation_shader/compiler/define.tesc | 19 +++++++++++++++++++
.../spec/arb_tessellation_shader/compiler/define.tese | 19 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 tests/spec/arb_tessellation_shader/compiler/define.tesc
create mode 100644 tests/spec/arb_tessellation_shader/compiler/define.tese
diff --git a/tests/all.py b/tests/all.py
index 0676af3..bf58b90 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1441,6 +1441,9 @@ spec['ARB_tessellation_shader'] = arb_tessellation_shader
add_concurrent_test(arb_tessellation_shader, 'arb_tessellation_shader-get')
add_concurrent_test(arb_tessellation_shader, 'arb_tessellation_shader-get-tcs-params')
add_concurrent_test(arb_tessellation_shader, 'arb_tessellation_shader-get-tes-params')
+import_glsl_parser_tests(arb_tessellation_shader,
+ os.path.join(testsDir, 'spec',
+ 'arb_tessellation_shader'), ['compiler'])
# Group ARB_texture_multisample
samplers_atm = ['sampler2DMS', 'isampler2DMS', 'usampler2DMS',
diff --git a/tests/spec/arb_tessellation_shader/compiler/define.tesc b/tests/spec/arb_tessellation_shader/compiler/define.tesc
new file mode 100644
index 0000000..ed9c782
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/define.tesc
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+#if !defined GL_ARB_tessellation_shader
+# error GL_ARB_tessellation_shader is not defined
+#elif GL_ARB_tessellation_shader != 1
+# error GL_ARB_tessellation_shader 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_tessellation_shader/compiler/define.tese b/tests/spec/arb_tessellation_shader/compiler/define.tese
new file mode 100644
index 0000000..ed9c782
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/define.tese
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+#if !defined GL_ARB_tessellation_shader
+# error GL_ARB_tessellation_shader is not defined
+#elif GL_ARB_tessellation_shader != 1
+# error GL_ARB_tessellation_shader 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.3.2
More information about the Piglit
mailing list