[Piglit] [PATCH 2/3] arb_vertex_attrib_64bit: add simple preprocessor tests

Dave Airlie airlied at gmail.com
Mon Feb 23 17:26:02 PST 2015


From: Dave Airlie <airlied at redhat.com>

This just tests the preprocessor defines appear in the shaders.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 .../arb_vertex_attrib_64bit/preprocessor/define.frag  | 19 +++++++++++++++++++
 .../arb_vertex_attrib_64bit/preprocessor/define.vert  | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
 create mode 100644 tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert

diff --git a/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
new file mode 100644
index 0000000..9bd723b
--- /dev/null
+++ b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_vertex_attrib_64bit
+// [end config]
+
+#version 150
+#extension GL_ARB_vertex_attrib_64bit: require
+
+#if !defined GL_ARB_vertex_attrib_64bit
+#  error GL_ARB_vertex_attrib_64bit is not defined
+#elif GL_ARB_vertex_attrib_64bit != 1
+#  error GL_ARB_vertex_attrib_64bit 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_vertex_attrib_64bit/preprocessor/define.vert b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert
new file mode 100644
index 0000000..9bd723b
--- /dev/null
+++ b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_vertex_attrib_64bit
+// [end config]
+
+#version 150
+#extension GL_ARB_vertex_attrib_64bit: require
+
+#if !defined GL_ARB_vertex_attrib_64bit
+#  error GL_ARB_vertex_attrib_64bit is not defined
+#elif GL_ARB_vertex_attrib_64bit != 1
+#  error GL_ARB_vertex_attrib_64bit 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.9.3



More information about the Piglit mailing list