[Piglit] [PATCH] arb_enhanced_layouts: test matrix attributes can't have a component qualifier

Timothy Arceri timothy.arceri at collabora.com
Mon Jan 25 20:38:11 PST 2016


I filled a spec bug for this as the GL Core spec seems to conflict
with the GLSL spec on this and its been confirmed that they are
not intended to be allowed.
---
 .../component-layout/matrix-array-attribute.vert     | 20 ++++++++++++++++++++
 .../compiler/component-layout/matrix-attribute.vert  | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-array-attribute.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-attribute.vert

diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-array-attribute.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-array-attribute.vert
new file mode 100644
index 0000000..34efe22
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-array-attribute.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "It is a compile-time error to apply the component qualifier to a matrix,
+//   a structure, a block, or an array containing any of these."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_explicit_attrib_location: require
+
+layout(location = 0, component = 1) in mat3 a[32];
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-attribute.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-attribute.vert
new file mode 100644
index 0000000..d889a20
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/matrix-attribute.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location
+// [end config]
+//
+// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+//   "It is a compile-time error to apply the component qualifier to a matrix,
+//   a structure, a block, or an array containing any of these."
+
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_explicit_attrib_location: require
+
+layout(location = 0, component = 1) in mat3 a;
+
+void main()
+{
+}
-- 
2.5.0



More information about the Piglit mailing list