summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2014-09-01 20:55:17 +1200
committerMarek Olšák <marek.olsak@amd.com>2015-07-27 12:27:41 +0200
commit5fc6d17c72738937cd691618785c7d4d5d11ccca (patch)
tree71b863d45b7d64f92570473850dc838293f99633
parentb01e4f8b3108369459151b1b6860bf9c3fba5dd9 (diff)
arb_tessellation_shader: Test array requirements for inputs and outputs
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tesc16
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tese16
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tesc14
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tese14
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tesc12
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tese12
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array-unnamed.tesc16
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array.tesc14
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/output-must-be-array.tesc12
-rw-r--r--tests/spec/arb_tessellation_shader/compiler/uniform-block-non-array.tesc15
10 files changed, 141 insertions, 0 deletions
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tesc b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tesc
new file mode 100644
index 000000000..a35cd9803
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tesc
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Inputs to the tessellation control shader must be arrays.
+// This test covers the case where the block has no instance name, which is
+// significant for Mesa's compiler.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in block {
+ vec4 x;
+}; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tese b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tese
new file mode 100644
index 000000000..7994784b7
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array-unnamed.tese
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex inputs to the tessellation evaluation shader must be arrays.
+// This test covers the case where the block has no instance name, which is
+// significant for Mesa's compiler.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in block {
+ vec4 x;
+}; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tesc b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tesc
new file mode 100644
index 000000000..d1faa5bc1
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tesc
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Inputs to the tessellation control shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in block {
+ vec4 x;
+} xs; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tese b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tese
new file mode 100644
index 000000000..09898b162
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-block-must-be-array.tese
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex inputs to the tessellation evaluation shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in block {
+ vec4 x;
+} xs; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tesc b/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tesc
new file mode 100644
index 000000000..f36a3ff43
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tesc
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Inputs to the tessellation control shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in vec4 x; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tese b/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tese
new file mode 100644
index 000000000..eb3596e74
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/input-must-be-array.tese
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex inputs to the tessellation evaluation shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+in vec4 x; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array-unnamed.tesc b/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array-unnamed.tesc
new file mode 100644
index 000000000..910b035d4
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array-unnamed.tesc
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex outputs from the tessellation control shader must be arrays.
+// This test covers the case where an output array has no instance name,
+// which is significant for Mesa's compiler.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+out block {
+ vec4 x;
+}; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array.tesc b/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array.tesc
new file mode 100644
index 000000000..3de153a6f
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/output-block-must-be-array.tesc
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex outputs from the tessellation control shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+out block {
+ vec4 x;
+} xs; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/output-must-be-array.tesc b/tests/spec/arb_tessellation_shader/compiler/output-must-be-array.tesc
new file mode 100644
index 000000000..47d1e4f71
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/output-must-be-array.tesc
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Per-vertex outputs from the tessellation control shader must be arrays.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+out vec4 x; /* not an array */
diff --git a/tests/spec/arb_tessellation_shader/compiler/uniform-block-non-array.tesc b/tests/spec/arb_tessellation_shader/compiler/uniform-block-non-array.tesc
new file mode 100644
index 000000000..361bc5081
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/uniform-block-non-array.tesc
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// Uniform blocks should not be affected by array requirements for input or output
+// blocks.
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+uniform block {
+ vec4 x;
+} xs; /* not an array, should work */