[Piglit] [PATCH 3/8] glsl-1.50: test for interface block type mismatch error

Paul Berry stereotype441 at gmail.com
Fri Feb 22 15:32:41 PST 2013


On 22 February 2013 15:23, Jordan Justen <jljusten at gmail.com> wrote:

> On Fri, Feb 22, 2013 at 10:07 AM, Paul Berry <stereotype441 at gmail.com>
> wrote:
> > On 17 February 2013 10:31, Jordan Justen <jordan.l.justen at intel.com>
> 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 <jordan.l.justen at intel.com>
> >> ---
> >>  ...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.
>
> I'll add it for 3 & 6 since they are negative tests. We wouldn't want
> to add this for tests that are expected to pass, right?
>
> -Jordan
>

Sure, I could go either way on what we do with the positive tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130222/b74289d8/attachment.html>


More information about the Piglit mailing list