[Piglit] [PATCH 01/13] arb_shader_storage_buffer_object: Add preprocessor tests
Samuel Iglesias Gonsalvez
siglesias at igalia.com
Wed May 13 23:17:13 PDT 2015
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
---
.../preprocessor/define.frag | 19 +++++++++++++++++++
.../preprocessor/define.vert | 19 +++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 tests/spec/arb_shader_storage_buffer_object/preprocessor/define.frag
create mode 100644 tests/spec/arb_shader_storage_buffer_object/preprocessor/define.vert
diff --git a/tests/spec/arb_shader_storage_buffer_object/preprocessor/define.frag b/tests/spec/arb_shader_storage_buffer_object/preprocessor/define.frag
new file mode 100644
index 0000000..ca9fc6d
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 110
+#extension GL_ARB_shader_storage_buffer_object: require
+
+#if !defined GL_ARB_shader_storage_buffer_object
+# error GL_ARB_shader_storage_buffer_object is not defined
+#elif GL_ARB_shader_storage_buffer_object != 1
+# error GL_ARB_shader_storage_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_shader_storage_buffer_object/preprocessor/define.vert b/tests/spec/arb_shader_storage_buffer_object/preprocessor/define.vert
new file mode 100644
index 0000000..ca9fc6d
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_shader_storage_buffer_object
+// [end config]
+
+#version 110
+#extension GL_ARB_shader_storage_buffer_object: require
+
+#if !defined GL_ARB_shader_storage_buffer_object
+# error GL_ARB_shader_storage_buffer_object is not defined
+#elif GL_ARB_shader_storage_buffer_object != 1
+# error GL_ARB_shader_storage_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; }
--
2.1.0
More information about the Piglit
mailing list