[Piglit] [PATCH] amd_shader_trinary_minmax: Add tests for the preprocessor define
Ian Romanick
idr at freedesktop.org
Fri Jan 24 13:25:36 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
This currently fails on Mesa.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
tests/all.py | 6 ++++++
.../amd_shader_trinary_minmax/compiler/define.frag | 19 +++++++++++++++++++
.../amd_shader_trinary_minmax/compiler/define.vert | 19 +++++++++++++++++++
3 files changed, 44 insertions(+)
create mode 100644 tests/spec/amd_shader_trinary_minmax/compiler/define.frag
create mode 100644 tests/spec/amd_shader_trinary_minmax/compiler/define.vert
diff --git a/tests/all.py b/tests/all.py
index b9dc92a..89dd7a3 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1407,6 +1407,12 @@ import_glsl_parser_tests(spec['AMD_conservative_depth'],
os.path.join(testsDir, 'spec', 'amd_conservative_depth'),
[''])
+# Group AMD_shader_trinary_minmax
+spec['AMD_shader_trinary_minmax'] = Group()
+import_glsl_parser_tests(spec['AMD_shader_trinary_minmax'],
+ os.path.join(testsDir, 'spec', 'amd_shader_trinary_minmax'),
+ [''])
+
# Group ARB_point_sprite
arb_point_sprite = Group()
spec['ARB_point_sprite'] = arb_point_sprite
diff --git a/tests/spec/amd_shader_trinary_minmax/compiler/define.frag b/tests/spec/amd_shader_trinary_minmax/compiler/define.frag
new file mode 100644
index 0000000..b1931cf
--- /dev/null
+++ b/tests/spec/amd_shader_trinary_minmax/compiler/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_AMD_shader_trinary_minmax
+// [end config]
+
+#version 110
+#extension GL_AMD_shader_trinary_minmax: require
+
+#if !defined GL_AMD_shader_trinary_minmax
+# error GL_AMD_shader_trinary_minmax is not defined
+#elif GL_AMD_shader_trinary_minmax != 1
+# error GL_AMD_shader_trinary_minmax 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/amd_shader_trinary_minmax/compiler/define.vert b/tests/spec/amd_shader_trinary_minmax/compiler/define.vert
new file mode 100644
index 0000000..b1931cf
--- /dev/null
+++ b/tests/spec/amd_shader_trinary_minmax/compiler/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_AMD_shader_trinary_minmax
+// [end config]
+
+#version 110
+#extension GL_AMD_shader_trinary_minmax: require
+
+#if !defined GL_AMD_shader_trinary_minmax
+# error GL_AMD_shader_trinary_minmax is not defined
+#elif GL_AMD_shader_trinary_minmax != 1
+# error GL_AMD_shader_trinary_minmax 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.1.4
More information about the Piglit
mailing list