Re: [Piglit] [PATCH 5/7] arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests
On Mon, 2016-10-24 at 11:05 +1100, Timothy Arceri wrote: > On Sat, 2016-10-22 at 23:42 +0300, Andres Gomez wrote: > > 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" > > > I believe this is just because the spec is written against the GLSL > 4.30 spec. I'm not so sure that enhanced layouts should add this > support. Did you test the Nvidia and Amd binary drivers to see what > they do? I run the tests with the proprietary drivers in a GNU/Linux box. NVidia and AMD are a mess with respect to this. Some pass, some not. My conclusion is that their implementation depends on the specific layout-qualifier-name tested. Therefore, if with, let's say max_vertices, they don't allow duplicates with different values, they will fail in all the cases; with duplicates in a single layout- qualifier or among several in the same declaration, no matter if ARB_shading_language_420pack or ARB_enhanced_layouts are supported. If duplicates with different values are allowed for the layout- qualifier-name tested, then the ones failing will be the negative tests. A mess ... Let's drop this by now. It is always easy to add more tests later. > Also I believe we should already have negative tests for this so some > of these tests are likely duplicates of existing tests, > probably ARB_shading_language_420pack tests. Oh, right, it is stupid to test for the absence in 2 different places. Good catch. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 5/7] arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests
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--- ...-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 000..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 000..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 000..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 @@ +//