summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert')
-rw-r--r--tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert b/tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert
new file mode 100644
index 000000000..f5d5ef2e8
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/out-of-bounds-access/vs-mat4-out-of-bounds-const-2.vert
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// [end config]
+
+/* From section 5.6 "Matrix Components" of the GLSL 1.20 spec:
+ *
+ * "It is an error to access a matrix with a constant expression
+ * that is outside the bounds of thematrix."
+ */
+
+#version 120
+
+void main()
+{
+ mat4 mat = mat4(1.0);
+ mat[255];
+}