Re: [Piglit] [PATCH] arb_separate_shader_objects: test mixed explicit and non-explicit locations
On Thu, 2015-11-19 at 14:21 +0100, Gregory Hainaut wrote: > Hello Timothy, > > > There seems to be 3 separate issues so I think we should have a separate > > tests > > (or at least cleary labebled subtests) for each of them. > > In this case, I propose that we keep your new test. It has a better > coverage than mine. Beside it will make my first test easier. > > > I also think you will need to rework your test a bit because with my fixes > > for > > outputs it will max out the varying limits, this is consistent with the > > issue > > you were having on the Nvidia blob. > Ok I will remove it. > > Note: as far as I understand, spec allow to optimize the interface of > a multiple-stage separated program. Extract from issue 8a and 8b of > the spec. So both implementations were valid. > "We allow the linker to perform internal optimizations on the > interfaces between stages of a multi-stage program object." Yes you are right. In that case you can leave it as is, however we should again make this case clear by having a separate piglit test or breaking it into a subtest. I also have modified my Mesa patches to allow for this, I'll send out V2 tomorrow after some additional testing. > > Best regards, > Gregory ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_separate_shader_objects: test mixed explicit and non-explicit locations
Hello Timothy, Normally the first of the 2 new SSO tests that I sent a couple of weeks ago cover this case. However my test is limited to the first location. Hopefully my Mesa patches take care of the issue. I will check it with this new test (and rebase my patches) Best regards, Gregory On 11/17/15, Timothy Arceriwrote: > This tests a bug in Mesa where explicit locations are not taken into > account when assigning varying locations which results in two > inputs/outputs being given the same location. > > Test results: > Nvidia GeForce 840M - NVIDIA 352.41: pass > i965 - Mesa 11.1-dev: fail > > Cc: Ian Romanick > Cc: Gregory Hainaut > --- > tests/all.py | 2 + > .../arb_separate_shader_objects/CMakeLists.gl.txt | 1 + > .../mixed_explicit_and_non_explicit_locations.c| 158 > + > 3 files changed, 161 insertions(+) > create mode 100644 > tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c > > diff --git a/tests/all.py b/tests/all.py > index 4d6c781..376cad0 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -2150,6 +2150,8 @@ with profile.group_manager( >'UseProgramStages - non-separable program') > g(['arb_separate_shader_object-ProgramUniform-coverage'], >'ProgramUniform coverage') > + > g(['arb_separate_shader_object-mixed_explicit_and_non_explicit_locations', > '-fbo'], > + 'Mixed explicit and non-explicit locations', run_concurrent=False) > g(['arb_separate_shader_object-rendezvous_by_location', '-fbo'], >'Rendezvous by location', run_concurrent=False) > g(['arb_separate_shader_object-rendezvous_by_location-5-stages'], > diff --git a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt > b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt > index f1b15c0..e8311e3 100644 > --- a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt > +++ b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt > @@ -15,6 +15,7 @@ piglit_add_executable > (arb_separate_shader_object-compat-builtins compat-builtin > piglit_add_executable (arb_separate_shader_object-GetProgramPipelineiv > GetProgramPipelineiv.c) > piglit_add_executable (arb_separate_shader_object-IsProgramPipeline > IsProgramPipeline.c) > piglit_add_executable (arb_separate_shader_object-ProgramUniform-coverage > ProgramUniform-coverage.c) > +piglit_add_executable > (arb_separate_shader_object-mixed_explicit_and_non_explicit_locations > mixed_explicit_and_non_explicit_locations.c) > piglit_add_executable (arb_separate_shader_object-rendezvous_by_location > rendezvous_by_location.c) > piglit_add_executable > (arb_separate_shader_object-rendezvous_by_location-3-stages > rendezvous_by_location-3-stages.c) > piglit_add_executable > (arb_separate_shader_object-rendezvous_by_location-5-stages > rendezvous_by_location-5-stages.c) > diff --git > a/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c > b/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c > new file mode 100644 > index 000..d0ad73c > --- /dev/null > +++ > b/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c > @@ -0,0 +1,158 @@ > +/* > + * Copyright © 2015 Intel Corporation > + * > + * Permission is hereby granted, free of charge, to any person obtaining a > + * copy of this software and associated documentation files (the > "Software"), > + * to deal in the Software without restriction, including without > limitation > + * the rights to use, copy, modify, merge, publish, distribute, > sublicense, > + * and/or sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice (including the > next > + * paragraph) shall be included in all copies or substantial portions of > the > + * Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS > OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT > SHALL > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR > OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS > + * IN THE SOFTWARE. > + */ > + > +/** > + * This tests a bug in Mesa where explicit locations are not taken into > + * account when assigning varying locations which results in two > + * inputs/outputs being given the same location. > + */ > +#include "piglit-util-gl.h" > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + > + config.supports_gl_compat_version = 10; > + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; > + >
[Piglit] [PATCH] arb_separate_shader_objects: test mixed explicit and non-explicit locations
This tests a bug in Mesa where explicit locations are not taken into account when assigning varying locations which results in two inputs/outputs being given the same location. Test results: Nvidia GeForce 840M - NVIDIA 352.41: pass i965 - Mesa 11.1-dev: fail Cc: Ian RomanickCc: Gregory Hainaut --- tests/all.py | 2 + .../arb_separate_shader_objects/CMakeLists.gl.txt | 1 + .../mixed_explicit_and_non_explicit_locations.c| 158 + 3 files changed, 161 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c diff --git a/tests/all.py b/tests/all.py index 4d6c781..376cad0 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2150,6 +2150,8 @@ with profile.group_manager( 'UseProgramStages - non-separable program') g(['arb_separate_shader_object-ProgramUniform-coverage'], 'ProgramUniform coverage') +g(['arb_separate_shader_object-mixed_explicit_and_non_explicit_locations', '-fbo'], + 'Mixed explicit and non-explicit locations', run_concurrent=False) g(['arb_separate_shader_object-rendezvous_by_location', '-fbo'], 'Rendezvous by location', run_concurrent=False) g(['arb_separate_shader_object-rendezvous_by_location-5-stages'], diff --git a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt index f1b15c0..e8311e3 100644 --- a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt +++ b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt @@ -15,6 +15,7 @@ piglit_add_executable (arb_separate_shader_object-compat-builtins compat-builtin piglit_add_executable (arb_separate_shader_object-GetProgramPipelineiv GetProgramPipelineiv.c) piglit_add_executable (arb_separate_shader_object-IsProgramPipeline IsProgramPipeline.c) piglit_add_executable (arb_separate_shader_object-ProgramUniform-coverage ProgramUniform-coverage.c) +piglit_add_executable (arb_separate_shader_object-mixed_explicit_and_non_explicit_locations mixed_explicit_and_non_explicit_locations.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location rendezvous_by_location.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location-3-stages rendezvous_by_location-3-stages.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location-5-stages rendezvous_by_location-5-stages.c) diff --git a/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c b/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c new file mode 100644 index 000..d0ad73c --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/mixed_explicit_and_non_explicit_locations.c @@ -0,0 +1,158 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/** + * This tests a bug in Mesa where explicit locations are not taken into + * account when assigning varying locations which results in two + * inputs/outputs being given the same location. + */ +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 10; + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; + +PIGLIT_GL_TEST_CONFIG_END + +static GLuint pipeline; + +static const char *vs_code_template = + "#version %d\n" + "#extension GL_ARB_separate_shader_objects: require\n" + "#extension GL_ARB_explicit_attrib_location: require\n" + "\n" + "layout(location = 0) in vec4 piglit_vertex;\n" + "\n" + "layout(location = 0) out vec3 a;\n" +"out vec3 d;\n" +"out vec3 e;\n" + "layout(location = 1) out vec3 b;\n" +"out vec3 f;\n" + "layout(location = 2) out vec3 c;\n" + "\n" +