On 19 April 2013 12:05, Jordan Justen <[email protected]> wrote:

> Signed-off-by: Jordan Justen <[email protected]>
> ---
>  .../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
> [email protected]
> 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.
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to