[Piglit] [PATCH 1/7] glsl-1.50 interface blocks: test parsing interpolation qualifiers

Paul Berry stereotype441 at gmail.com
Tue Apr 30 15:20:05 PDT 2013


On 19 April 2013 12:05, Jordan Justen <jordan.l.justen at intel.com> wrote:

> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  .../compiler/interface-blocks-qualifiers-used.vert |   21
> ++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/compiler/interface-blocks-qualifiers-used.vert
>
> diff --git
> a/tests/spec/glsl-1.50/compiler/interface-blocks-qualifiers-used.vert
> b/tests/spec/glsl-1.50/compiler/interface-blocks-qualifiers-used.vert
> new file mode 100644
> index 0000000..b106d4a
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/interface-blocks-qualifiers-used.vert
> @@ -0,0 +1,21 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Tests that supported qualifiers can be compiled.
> +
> +#version 150
> +
> +out block {
> +    smooth float a;
> +    flat float b;
> +    noperspective float c;
> +    centroid out float d;
> +} inst;
> +
> +void main()
> +{
> +}
> +
> --
> 1.7.10.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>

I'm concerned that this test isn't adequate for testing the functionality.
It's easy to imagine a bug in which the qualifiers "smooth", "flat",
"noperspective", and "centroid" were allowed by the parser inside interface
blocks, but had no effect.

I'd recommend making a shader_runner test that compares smooth, flat,
noperspective, and centroid varyings inside an interface block with smooth,
flat, noperspective, and centroid varyings declared outside of interface
blocks.  If the varyings compare equal in the fragment shader, then that
should be an adequate test, since we have other piglit tests to verify that
these qualifiers work when outside of interface blocks.

Note: to test centroid adequately, we'd need to expand shader_runner to
support multisampling.  That's going to be a bit of a pain--either we'll
have to expand the piglit/waffle interface to allow shader_runner to
request a multisampled visual (that's my preference), or we'll have to
modify shader_runner to do its rendering into an fbo and then blit to the
window (kinda hacky but should get the job done).  I'd be ok if we want to
punt on this for now given the pain involved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130430/f7c68aed/attachment.html>


More information about the Piglit mailing list