[Piglit] [PATCH 7/9] ext_shader_samples_identical: add test for preprocessor define

Ian Romanick idr at freedesktop.org
Thu Nov 19 20:00:13 PST 2015


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

v2: Move the changes to tests/spec/CMakeLists.txt to a later patch.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/CMakeLists.txt                             |  1 -
 .../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 +++++++++++++++++++
 6 files changed, 94 insertions(+), 1 deletion(-)
 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/CMakeLists.txt b/tests/spec/CMakeLists.txt
index 408649d..a5c42dc 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -76,7 +76,6 @@ add_subdirectory (ext_framebuffer_multisample)
 add_subdirectory (ext_framebuffer_multisample_blit_scaled)
 add_subdirectory (ext_packed_depth_stencil)
 add_subdirectory (ext_packed_float)
-add_subdirectory (ext_shader_samples_identical)
 add_subdirectory (ext_texture_swizzle)
 add_subdirectory (ext_timer_query)
 add_subdirectory (ext_transform_feedback)
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