Re: [Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks
On 15/07/17 06:21, Józef Kucia wrote: On Tue, May 30, 2017 at 4:23 PM, Józef Kuciawrote: This test exposes a Mesa GLSL linker bug. The test fails with the following error message: error: Input block `blk' is not an output of the previous stage Section 4.3.4 (Inputs) of the GLSL 1.50 spec says: "Only the input variables that are actually read need to be written by the previous stage; it is allowed to have superfluous declarations of input variables." --- .../interstage-multiple-shader-objects.shader_test | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test Ping. Could someone take a look? I've push this patch. Thanks for the test :) ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks
On Tue, May 30, 2017 at 4:23 PM, Józef Kuciawrote: > This test exposes a Mesa GLSL linker bug. The test fails with the > following error message: > > error: Input block `blk' is not an output of the previous stage > > Section 4.3.4 (Inputs) of the GLSL 1.50 spec says: > > "Only the input variables that are actually read need to be written > by the previous stage; it is allowed to have superfluous > declarations of input variables." > --- > .../interstage-multiple-shader-objects.shader_test | 38 > ++ > 1 file changed, 38 insertions(+) > create mode 100644 > tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test Ping. Could someone take a look? ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks
On Wed, May 31, 2017 at 9:42 PM, Ian Romanickwrote: > On 05/30/2017 07:23 AM, Józef Kucia wrote: >> This test exposes a Mesa GLSL linker bug. The test fails with the > > Is there a bugzilla for this issue? Was this encountered in a app or ... ? I filed a bug report for this issue today. It's bug 101247 [1]. >> following error message: >> >> error: Input block `blk' is not an output of the previous stage >> >> Section 4.3.4 (Inputs) of the GLSL 1.50 spec says: >> >> "Only the input variables that are actually read need to be written >> by the previous stage; it is allowed to have superfluous >> declarations of input variables." > > There are some additional rules for separate shader objects programs, > and it sounds like we may be applying them too broadly. > >> --- >> .../interstage-multiple-shader-objects.shader_test | 38 >> ++ >> 1 file changed, 38 insertions(+) >> create mode 100644 >> tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test >> >> diff --git >> a/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test >> b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test >> new file mode 100644 >> index 000..66a46d5 >> --- /dev/null >> +++ >> b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test >> @@ -0,0 +1,38 @@ >> +# Exercises a Mesa GLSL linker bug. >> +# >> +# Note that the output block is not used and it is not declared in the main >> +# shader object. >> + >> +[require] >> +GLSL >= 1.50 >> + >> +[vertex shader] >> +out blk { >> + vec4 foo; >> +} inst; >> + >> +void set_output(vec4 v) >> +{ >> + gl_Position = v; >> +} >> + >> +[vertex shader] > > Are there supposed to be two vertex shaders? Is that necessary to > reproduce the link failure? Two vertex shaders are necessary to reproduce the link failure. My understanding of the issue is that when an output block is declared in a shader object other than the one with the main() function, and the output block is unused then there won't be any trace of the original block declaration in the linked shader produced by link_intrastage_shaders(). The linker fails while trying to find the matching output block in the linked shader. However, a stronger test case is probably also a valid GLSL program. My understanding of the GL spec suggests that a similar GLSL program should link even if the matching output block is not declared in a vertex shader at all, because there is no static use of the input block in the fragment shader. [1] - https://bugs.freedesktop.org/show_bug.cgi?id=101247 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks
On 05/30/2017 07:23 AM, Józef Kucia wrote: > This test exposes a Mesa GLSL linker bug. The test fails with the Is there a bugzilla for this issue? Was this encountered in a app or ... ? > following error message: > > error: Input block `blk' is not an output of the previous stage > > Section 4.3.4 (Inputs) of the GLSL 1.50 spec says: > > "Only the input variables that are actually read need to be written > by the previous stage; it is allowed to have superfluous > declarations of input variables." There are some additional rules for separate shader objects programs, and it sounds like we may be applying them too broadly. > --- > .../interstage-multiple-shader-objects.shader_test | 38 > ++ > 1 file changed, 38 insertions(+) > create mode 100644 > tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test > > diff --git > a/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test > b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test > new file mode 100644 > index 000..66a46d5 > --- /dev/null > +++ > b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test > @@ -0,0 +1,38 @@ > +# Exercises a Mesa GLSL linker bug. > +# > +# Note that the output block is not used and it is not declared in the main > +# shader object. > + > +[require] > +GLSL >= 1.50 > + > +[vertex shader] > +out blk { > + vec4 foo; > +} inst; > + > +void set_output(vec4 v) > +{ > + gl_Position = v; > +} > + > +[vertex shader] Are there supposed to be two vertex shaders? Is that necessary to reproduce the link failure? > +void set_output(vec4 v); > + > +void main() > +{ > + set_output(vec4(1.0)); > +} > + > +[fragment shader] > +in blk { > + vec4 foo; > +} inst; > + > +void main() > +{ > + gl_FragColor = vec4(1.0); > +} > + > +[test] > +link success > ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks
This test exposes a Mesa GLSL linker bug. The test fails with the following error message: error: Input block `blk' is not an output of the previous stage Section 4.3.4 (Inputs) of the GLSL 1.50 spec says: "Only the input variables that are actually read need to be written by the previous stage; it is allowed to have superfluous declarations of input variables." --- .../interstage-multiple-shader-objects.shader_test | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test diff --git a/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test new file mode 100644 index 000..66a46d5 --- /dev/null +++ b/tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test @@ -0,0 +1,38 @@ +# Exercises a Mesa GLSL linker bug. +# +# Note that the output block is not used and it is not declared in the main +# shader object. + +[require] +GLSL >= 1.50 + +[vertex shader] +out blk { + vec4 foo; +} inst; + +void set_output(vec4 v) +{ + gl_Position = v; +} + +[vertex shader] +void set_output(vec4 v); + +void main() +{ + set_output(vec4(1.0)); +} + +[fragment shader] +in blk { + vec4 foo; +} inst; + +void main() +{ + gl_FragColor = vec4(1.0); +} + +[test] +link success -- 2.10.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit