[Piglit] [PATCH] arb_enhanced_layouts: tests for duplicate layout identifiers

Timothy Arceri timothy.arceri at collabora.com
Thu Jan 14 18:32:53 PST 2016


Test results:
Nvidia GeForce 840M - NVIDIA 352.41

The results from the Nvidia binary are a little all over the place with these
tests, most of the tests with arb_enhanced_layouts enabled fail but
if the GLSL version is changed to 4.20 they pass.
The only tests that pass with arb_enhanced_layouts enabled are the
global tests but that seems to be because they do not detect the duplicates
and fail the negative tests.

Cc: Matt Turner <mattst88 at gmail.com>
---
 ...fiers-in-single-layout-no-enhanced-layouts.vert | 22 +++++++++++++++++
 ...iple-location-identifiers-in-single-layout.vert | 23 ++++++++++++++++++
 ...n-single-layout-global-no-enhanced-layouts.geom | 27 +++++++++++++++++++++
 ...stream-identifiers-in-single-layout-global.geom | 28 ++++++++++++++++++++++
 ...fiers-in-single-layout-no-enhanced-layouts.geom | 25 +++++++++++++++++++
 ...ltiple-stream-identifiers-in-single-layout.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-layout-no-enhanced-layouts.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout.vert
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-global-no-enhanced-layouts.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-global.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-no-enhanced-layouts.geom
 create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout.geom

diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout-no-enhanced-layouts.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout-no-enhanced-layouts.vert
new file mode 100644
index 0000000..4568433
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout-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, 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-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..e784a7c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-layout.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, 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-layout-global-no-enhanced-layouts.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-global-no-enhanced-layouts.geom
new file mode 100644
index 0000000..2e6afc2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-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, 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-layout-global.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-global.geom
new file mode 100644
index 0000000..c23b7ee
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-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, 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-layout-no-enhanced-layouts.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-no-enhanced-layouts.geom
new file mode 100644
index 0000000..d4fb966
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout-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, 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-layout.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout.geom
new file mode 100644
index 0000000..ae6684a
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-layout.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, stream=1) out vec3 var;
+
+void main()
+{
+}
-- 
2.4.3



More information about the Piglit mailing list