On 17 February 2013 10:31, Jordan Justen <[email protected]> wrote:

> Signed-off-by: Jordan Justen <[email protected]>
> ---
>  .../execution/interface-blocks-with-gs.shader_test |   57
> ++++++++++++++++++++
>  1 file changed, 57 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/execution/interface-blocks-with-gs.shader_test
>
> diff --git
> a/tests/spec/glsl-1.50/execution/interface-blocks-with-gs.shader_test
> b/tests/spec/glsl-1.50/execution/interface-blocks-with-gs.shader_test
> new file mode 100644
> index 0000000..c620f46
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/execution/interface-blocks-with-gs.shader_test
> @@ -0,0 +1,57 @@
> +[require]
> +GL >= 3.1
>

I think this should be "GL >= 3.2".

With that fixed, this is:

Reviewed-by: Paul Berry <[email protected]>

I also sent out comments on patches 1 and 3.

One final note: a lot of these tests specifically validate a sentence or
two from the GLSL spec, which is great.  Generally for tests like these, I
prefer to see the relevant text from the spec quoted as a comment in the
test.  This reduces the risk of someone coming along later and disabling
the test because their implementation fails it and they think the test is
wrong (this has happened in the past).  It doesn't have to be much--see for
instance
tests/spec/glsl-1.50/compiler/no-statement-before-first-case.vert.  This
would be particularly valuable for patches 6 and 7, since as you point out,
the nVidia binary driver fails some of these tests.

No need to go overboard of course--for example IMHO this patch is fine as
is, since it doesn't test a specific line item from the spec, it just tests
basic functionality of interface blocks.

In any case, the remainder of the series is:

Reviewed-by: Paul Berry <[email protected]>



> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150
> +
> +in vec4 vertex;
> +
> +out block {
> +  vec4 vertex_to_gs;
> +};
> +
> +void main()
> +{
> +  vertex_to_gs = vertex;
> +}
> +
> +[geometry shader]
> +#version 150
> +
> +layout(triangles) in;
> +layout(triangle_strip, max_vertices = 3) out;
> +
> +in block {
> +  vec4 vertex_to_gs;
> +} inst[];
> +
> +void main()
> +{
> +  for (int i = 0; i < 3; i++) {
> +    gl_Position = inst[i].vertex_to_gs;
> +    EmitVertex();
> +  }
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +out vec4 color;
> +
> +void main()
> +{
> +  color = vec4(0.0, 1.0, 0.0, 1.0);
> +}
> +
> +[vertex data]
> +vertex/float/2
> +-1.0 -1.0
> +-1.0  1.0
> + 1.0  1.0
> + 1.0 -1.0
> +
> +[test]
> +draw arrays GL_TRIANGLE_FAN 0 4
> +probe all rgba 0.0 1.0 0.0 1.0
> +
> --
> 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

Reply via email to