[Piglit] [PATCH 2/4] GLSL 1.50 Interface blocks: Test that the array index must be used to access a member of a block declared in an array.

Nicholas Mack nichmack at gmail.com
Fri Sep 27 11:28:51 PDT 2013


---
 ...locks-array-index-needed-to-access-members.vert | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/interface-blocks-array-index-needed-to-access-members.vert

diff --git a/tests/spec/glsl-1.50/compiler/interface-blocks-array-index-needed-to-access-members.vert b/tests/spec/glsl-1.50/compiler/interface-blocks-array-index-needed-to-access-members.vert
new file mode 100644
index 0000000..1a491af
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-blocks-array-index-needed-to-access-members.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that in order to access a block member in a block array, the array
+// index must be included.
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "For blocks declared as arrays, the array index must also be included
+//  when accessing members"
+
+#version 150
+
+out Block {
+	float a;
+	vec3 b;
+} array_blocks[2];
+
+void main()
+{
+	array_blocks.a = 5.0;
+
+}
-- 
1.8.3.1



More information about the Piglit mailing list