Ian Romanick <[email protected]> writes: > From: Ian Romanick <[email protected]> > > There are several variations of > > void foo(inout int i, inout float f); > ... > foo(i, f[i]); > > that Mesa's GLSL compiler gets wrong. NVIDIA's closed-source driver > (version 304.64) fails vs-inout-index-inout-mat2-col.shader_test and > vs-inout-index-inout-mat2-row.shader_test, but passes the others.
> diff --git
> a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
>
> b/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
> new file mode 100644
> index 0000000..ed01ab6
> --- /dev/null
> +++
> b/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
> @@ -0,0 +1,34 @@
> +[require]
> +GLSL >= 1.20
> +
> +[vertex shader]
> +uniform int u = 0;
I think you mean "u = 1" like the rest of the tests.
> +varying vec4 color;
> +
> +void func(inout int i, inout float f)
> +{
> + i = 0;
> + f = 1.;
> +}
> +
> +void main()
> +{
> + mat2 m = mat2(0.);
> + int i = u;
> +
> + func(i, m[i][1]);
> + color = vec4(m[0].x, m[0].y, m[1].x, m[1].y);
> + gl_Position = gl_Vertex;
> +}
> +
> +[fragment shader]
> +varying vec4 color;
> +
> +void main()
> +{
> + gl_FragColor = color;
> +}
> +
> +[test]
> +draw rect -1 -1 2 2
> +relative probe rgb (.5, .5) (0., 1., 0.)
I'd rather see "probe all rgba" in these tests, since failing tests in
many cases on our hardware will intermittently fail a single pixel probe
even though they would consistently fail a probe all.
pgpIs6qZjGDsO.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
