[Piglit] [PATCH] arb_shading_language_420pack: test multiple layout qualifiers on the same line

Timothy Arceri timothy.arceri at collabora.com
Wed Jan 13 20:48:56 PST 2016


While the spec is taking about multiple layout qualifiers we interpert that
to mean layout-qualifier-names can also occur multiple times within
a single layout qualifier.

In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:

   "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"

The results from the Nvidia binary are a little all over the place with these
tests, most of the tests with arb_shading_language_420pack enabled fail but
if the GLSL version is changed to 4.20 they pass.
The only tests that pass with arb_shading_language_420pack enabled are the
global tests but that seems to be because they not detect the duplicates
and fail the negative tests.
---
 ...e-qualifier-in-single-declaration-420-pack.vert | 22 +++++++++++++
 ...ualifier-in-single-declaration-no-420-pack.vert | 21 ++++++++++++
 ...n-qualifier-in-single-declaration-420-pack.vert | 33 +++++++++++++++++++
 ...ualifier-in-single-declaration-no-420-pack.vert | 32 ++++++++++++++++++
 ...iple-stream-in-single-declaration-420-pack.geom | 36 ++++++++++++++++++++
 ...e-stream-in-single-declaration-no-420-pack.geom | 35 ++++++++++++++++++++
 ...ream-in-single-global-declaration-420-pack.geom | 38 ++++++++++++++++++++++
 ...m-in-single-global-declaration-no-420-pack.geom | 37 +++++++++++++++++++++
 ...e-qualifier-in-single-declaration-420-pack.geom | 25 ++++++++++++++
 ...ualifier-in-single-declaration-no-420-pack.geom | 24 ++++++++++++++
 ...fier-in-single-global-declaration-420-pack.geom | 27 +++++++++++++++
 ...r-in-single-global-declaration-no-420-pack.geom | 37 +++++++++++++++++++++
 12 files changed, 367 insertions(+)
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-no-420-pack.vert
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-420-pack.vert
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-no-420-pack.vert
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-no-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-no-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-no-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-420-pack.geom
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-no-420-pack.geom

diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert
new file mode 100644
index 0000000..10cb124
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+
+#version 150
+#extension GL_ARB_separate_shader_objects : enable
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(location=2) layout(location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-no-420-pack.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-no-420-pack.vert
new file mode 100644
index 0000000..14cc893
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-no-420-pack.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+
+#version 150
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location=2) layout(location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-420-pack.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-420-pack.vert
new file mode 100644
index 0000000..1eb031e
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-420-pack.vert
@@ -0,0 +1,33 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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_separate_shader_objects : enable
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(location=2, location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-no-420-pack.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-no-420-pack.vert
new file mode 100644
index 0000000..086fb83
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-no-420-pack.vert
@@ -0,0 +1,32 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.40
+// require_extensions: GL_ARB_separate_shader_objects
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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_separate_shader_objects : enable
+
+layout(location=2, location=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-420-pack.geom
new file mode 100644
index 0000000..a7e66b2
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-420-pack.geom
@@ -0,0 +1,36 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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_shading_language_420pack: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2, stream=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-no-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-no-420-pack.geom
new file mode 100644
index 0000000..16c8f95
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-no-420-pack.geom
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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, stream=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-420-pack.geom
new file mode 100644
index 0000000..2d8b074
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-420-pack.geom
@@ -0,0 +1,38 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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_shading_language_420pack: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2, stream=1) out;
+
+vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-no-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-no-420-pack.geom
new file mode 100644
index 0000000..1d5f25a
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-no-420-pack.geom
@@ -0,0 +1,37 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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, stream=1) out;
+
+vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-420-pack.geom
new file mode 100644
index 0000000..bd66b31
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-420-pack.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-no-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-no-420-pack.geom
new file mode 100644
index 0000000..d1af2b4
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-no-420-pack.geom
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+
+#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_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-420-pack.geom
new file mode 100644
index 0000000..ae9266b
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-420-pack.geom
@@ -0,0 +1,27 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5 GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(points) in;
+layout(points) out;
+
+layout(stream=2) layout(stream=1) out;
+
+vec3 var;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-no-420-pack.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-no-420-pack.geom
new file mode 100644
index 0000000..408c811
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-no-420-pack.geom
@@ -0,0 +1,37 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//   "More than one layout qualifier may appear in a single declaration. If
+//   the same layout-qualifier-name occurs in multiple layout qualifiers for
+//   the same declaration, the last one overrides the former ones."
+//
+// While the spec is taking about multiple layout qualifiers we interpert that
+// to mean layout-qualifier-names can also occur multiple times within
+// a single layout qualifier.
+//
+// In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this:
+//
+//   "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()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list