[Piglit] [PATCH 1/5] arb_enhanced_layouts: test preprocessor define

Timothy Arceri timothy.arceri at collabora.com
Sun Nov 1 17:54:37 PST 2015


From: Timothy Arceri <t_arceri at yahoo.com.au>

---
 tests/spec/arb_enhanced_layouts/compiler/define.frag | 19 +++++++++++++++++++
 tests/spec/arb_enhanced_layouts/compiler/define.vert | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/define.frag
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/define.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/define.frag b/tests/spec/arb_enhanced_layouts/compiler/define.frag
new file mode 100644
index 0000000..38d25da
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+#if !defined GL_ARB_enhanced_layouts
+#  error GL_ARB_enhanced_layouts is not defined
+#elif GL_ARB_enhanced_layouts != 1
+#  error GL_ARB_enhanced_layouts 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_enhanced_layouts/compiler/define.vert b/tests/spec/arb_enhanced_layouts/compiler/define.vert
new file mode 100644
index 0000000..38d25da
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+#if !defined GL_ARB_enhanced_layouts
+#  error GL_ARB_enhanced_layouts is not defined
+#elif GL_ARB_enhanced_layouts != 1
+#  error GL_ARB_enhanced_layouts 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; }
-- 
2.4.3



More information about the Piglit mailing list