On 17 February 2013 10:31, Jordan Justen <[email protected]> wrote:
> This tests to see if an interface block with a type mismatch > between the VS and FS causes a link error. > > Signed-off-by: Jordan Justen <[email protected]> > --- > ...terface-blocks-member-type-mismatch.shader_test | 28 > ++++++++++++++++++++ > 1 file changed, 28 insertions(+) > create mode 100644 > tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test > > diff --git > a/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test > b/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test > new file mode 100644 > index 0000000..a996a4d > --- /dev/null > +++ > b/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test > @@ -0,0 +1,28 @@ > +[require] > +GLSL >= 1.50 > + > +[vertex shader] > +#version 150 > + > +uniform block { > + vec4 a; // a is vec3 in FS > +} inst_a; > + > +void main() > +{ > Although GLSL 1.50 no longer requires the shader to assign to gl_Position, I'm aware of at least one implementation (Apple with AMD chipsets) which runs into problems if gl_Position is not assigned. To be on the safe side, I would recommend inserting "gl_Position = vec4(0.0);" here, just so that an implementation won't erroneously pass this test due to bugs with gl_Position. I'd recommend making similar changes to patches 4-6. With that change, this patch is: Reviewed-by: Paul Berry <[email protected]> > +} > + > +[fragment shader] > +#version 150 > + > +uniform block { > + vec3 a; // a is vec4 in VS > +} inst_b; > + > +void main() > +{ > +} > + > +[test] > +link error > + > -- > 1.7.10.4 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit >
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
