[Piglit] [PATCH 1/2] GL_ARB_ubo: Test for the #define being present.
Eric Anholt
eric at anholt.net
Thu Jul 26 16:32:43 PDT 2012
I had missed this at one point in the patch series, so might as well
add tests.
---
.../preprocessor/define.frag | 19 +++++++++++++++++++
.../preprocessor/define.vert | 19 +++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 tests/spec/arb_uniform_buffer_object/preprocessor/define.frag
create mode 100644 tests/spec/arb_uniform_buffer_object/preprocessor/define.vert
diff --git a/tests/spec/arb_uniform_buffer_object/preprocessor/define.frag b/tests/spec/arb_uniform_buffer_object/preprocessor/define.frag
new file mode 100644
index 0000000..e1c13e8
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+#version 110
+#extension GL_ARB_uniform_buffer_object: require
+
+#if !defined GL_ARB_uniform_buffer_object
+# error GL_ARB_uniform_buffer_object is not defined
+#elif GL_ARB_uniform_buffer_object != 1
+# error GL_ARB_uniform_buffer_object 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_uniform_buffer_object/preprocessor/define.vert b/tests/spec/arb_uniform_buffer_object/preprocessor/define.vert
new file mode 100644
index 0000000..e1c13e8
--- /dev/null
+++ b/tests/spec/arb_uniform_buffer_object/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_uniform_buffer_object
+// [end config]
+
+#version 110
+#extension GL_ARB_uniform_buffer_object: require
+
+#if !defined GL_ARB_uniform_buffer_object
+# error GL_ARB_uniform_buffer_object is not defined
+#elif GL_ARB_uniform_buffer_object != 1
+# error GL_ARB_uniform_buffer_object 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.7.10.4
More information about the Piglit
mailing list