[Piglit] [PATCH 02/11] arb_shader_subroutine: add test for preprocessor define
Chris Forbes
chrisf at ijw.co.nz
Sun Aug 10 04:06:53 PDT 2014
---
.../arb_shader_subroutine/preprocessor/define.vert | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 tests/spec/arb_shader_subroutine/preprocessor/define.vert
diff --git a/tests/spec/arb_shader_subroutine/preprocessor/define.vert b/tests/spec/arb_shader_subroutine/preprocessor/define.vert
new file mode 100644
index 0000000..37d99b6
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+#if !defined GL_ARB_shader_subroutine
+# error GL_ARB_shader_subroutine is not defined
+#elif GL_ARB_shader_subroutine != 1
+# error GL_ARB_shader_subroutine 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.0.4
More information about the Piglit
mailing list