[Piglit] [PATCH 8/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single uniform declaration tests

Andres Gomez agomez at igalia.com
Wed Oct 26 16:14:15 UTC 2016


Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable uniform declaration are
taken into account.

The tests check that this works for non-value layout-qualifier-ids. So
far, there is no value layout-qualifier-ids with which to check.

>From the ARB_shading_language_420pack spec:

    "More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez <agomez at igalia.com>
---
 ...e-layout-qualifier-in-single-declaration-1.vert | 30 ++++++++++++++++++++++
 ...e-layout-qualifier-in-single-declaration-2.vert | 30 ++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert

diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
new file mode 100644
index 0000000..947444f
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//    "The *align* qualifier can only be used on blocks or block
+//     members, and only for blocks declared with *std140* or *std430*
+//     layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) layout(row_major) uniform;
+
+layout(align = 32) uniform block {
+	vec4 var1;
+	vec4 var2;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert
new file mode 100644
index 0000000..c82547a
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//    "The *align* qualifier can only be used on blocks or block
+//     members, and only for blocks declared with *std140* or *std430*
+//     layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(row_major) layout(std140) uniform;
+
+layout(align = 32) uniform block {
+	vec4 var1;
+	vec4 var2;
+};
+
+void main()
+{
+}
-- 
2.9.3



More information about the Piglit mailing list