[Piglit] [PATCH 2/4] ext_shader_samples_identical: add test for preprocessor define

Ian Romanick idr at freedesktop.org
Wed Nov 18 17:46:27 PST 2015


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../glsl-1.10/preprocessor/define.frag                | 19 +++++++++++++++++++
 .../glsl-1.10/preprocessor/define.vert                | 19 +++++++++++++++++++
 .../glsl-1.50/preprocessor/define.geom                | 18 ++++++++++++++++++
 .../glsl-es-3.10/preprocessor/define.frag             | 19 +++++++++++++++++++
 .../glsl-es-3.10/preprocessor/define.vert             | 19 +++++++++++++++++++
 5 files changed, 94 insertions(+)
 create mode 100644 tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
 create mode 100644 tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
 create mode 100644 tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
 create mode 100644 tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
 create mode 100644 tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.vert

diff --git a/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
new file mode 100644
index 0000000..c48232a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical 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/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
new file mode 100644
index 0000000..c48232a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical 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/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom b/tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
new file mode 100644
index 0000000..c7d677a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical 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/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
new file mode 100644
index 0000000..00a1d1c
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.10
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#version 310 es
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical 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/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.vert b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.vert
new file mode 100644
index 0000000..00a1d1c
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.10
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#version 310 es
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical 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