[Piglit] [PATCH 5/7] arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests

Andres Gomez agomez at igalia.com
Sat Oct 22 20:42:24 UTC 2016


We already had tests for a repeated layout-qualifier-name in a single
layout-qualifier. Now, we also add similar tests to check across
multiple layout-qualifiers in the same declaration.

>From the ARB_enhanced_layouts spec:

    "More than one layout qualifier may appear in a single declaration.
     Additionally, the same layout-qualifier-name can occur multiple times
     within a layout qualifier or across multiple layout qualifiers in the
     same declaration"

Signed-off-by: Andres Gomez <agomez at igalia.com>
---
 ...-in-single-declaration-no-enhanced-layouts.vert | 22 +++++++++++++++++
 ...location-identifiers-in-single-declaration.vert | 23 ++++++++++++++++++
 ...gle-declaration-global-no-enhanced-layouts.geom | 27 +++++++++++++++++++++
 ...ifiers-in-single-declaration-layout-global.geom | 28 ++++++++++++++++++++++
 ...-in-single-declaration-no-enhanced-layouts.geom | 25 +++++++++++++++++++
 ...e-stream-identifiers-in-single-declaration.geom | 26 ++++++++++++++++++++
 6 files changed, 151 insertions(+)
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-layout-global.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-no-enhanced-layouts.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration.geom

diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert
new file mode 100644
index 0000000..3e1827e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 140
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location=2) layout(location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert
new file mode 100644
index 0000000..30b6875
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 140
+#extension GL_ARB_separate_shader_objects : enable
+#extension GL_ARB_enhanced_layouts: enable
+
+layout(location=2) layout(location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom
new file mode 100644
index 0000000..0bc8eae
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom
@@ -0,0 +1,27 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out;
+
+out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-layout-global.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-layout-global.geom
new file mode 100644
index 0000000..bcbf800
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-layout-global.geom
@@ -0,0 +1,28 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+#extension GL_ARB_enhanced_layouts: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out;
+
+out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-no-enhanced-layouts.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-no-enhanced-layouts.geom
new file mode 100644
index 0000000..965f0c1
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-no-enhanced-layouts.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration.geom
new file mode 100644
index 0000000..4490ea6
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration.geom
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_enhanced_layouts
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration"
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+#extension GL_ARB_enhanced_layouts: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out vec3 var;
+
+void main()
+{
+}
-- 
2.9.3



More information about the Piglit mailing list