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

2016-01-19 Thread Matt Turner
On Thu, Jan 14, 2016 at 6:32 PM, Timothy Arceri
 wrote:
> 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 

Reviewed-by: Matt Turner 
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


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

2016-01-14 Thread Timothy Arceri
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 
---
 ...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 000..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 000..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 000..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