[Piglit] [PATCH] gles-es-3.10: unsized-array-not-in-last-position

Jose Maria Casanova Crespo jmcasanova at igalia.com
Fri Feb 10 13:15:22 UTC 2017


>From GLSL ES 3.10 spec, section 4.1.9 "Arrays":

"If an array is declared as the last member of a shader storage block
and the size is not specified at compile-time, it is sized at run-time.
In all other cases, arrays are sized only at compile-time."

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
---
 .../unsized-array-not-in-last-position.comp         | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp

diff --git a/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp b/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp
new file mode 100644
index 0000000..fc9219d
--- /dev/null
+++ b/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.10 es
+// [end config]
+
+#version 310 es
+
+/* From GLSL ES 3.10 spec, section 4.1.9 "Arrays":
+ *
+ * "If an array is declared as the last member of a shader storage block
+ *  and the size is not specified at compile-time, it is sized at run-time.
+ *  In all other cases, arrays are sized only at compile-time."
+ */
+
+buffer ssbo {
+	int c[];
+	vec4 d;
+};
+
+void main(void) {
+}
-- 
2.9.3



More information about the Piglit mailing list