[Piglit] [PATCH] glsl-1.50: add tests for gl_FragCoord layout parameters

Paul Berry stereotype441 at gmail.com
Mon Jan 14 11:00:25 PST 2013


On 13 January 2013 20:11, Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> These are promoted from GL_ARB_fragment_coord_conventions.
>
> GLSL 1.50 add two layout parameters for gl_FragCoord,
> test them on their own, and in combination.
>

In general, for cases like this, I prefer to create a shader_runner
execution test so that we can test that the feature under test compiles
*and* executes correctly.  Can we do that for these tests?

I feel similarly about the two patches that follow ("glsl-1.50: check
compiler accepts gl_PrimitiveID for fragment shader" and "glsl-1.50: add
test for core profile argument to version").


>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag  | 12
> ++++++++++++
>  .../glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag   | 12
> ++++++++++++
>  .../compiler/gl_FragCoord-pixel-center-integer.frag          | 12
> ++++++++++++
>  3 files changed, 36 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
>  create mode 100644
> tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
>  create mode 100644
> tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
>
> diff --git a/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
> b/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
> new file mode 100644
> index 0000000..1182c58
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-both-layout.frag
> @@ -0,0 +1,12 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +#version 150
> +
> +layout(origin_upper_left,pixel_center_integer) in vec4 gl_FragCoord;
> +
> +vec4 func()
> +{
> +       return gl_FragCoord;
> +}
> diff --git
> a/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
> b/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
> new file mode 100644
> index 0000000..2cfc684
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-origin-upper-left.frag
> @@ -0,0 +1,12 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +#version 150
> +
> +layout(origin_upper_left) in vec4 gl_FragCoord;
> +
> +vec4 func()
> +{
> +       return gl_FragCoord;
> +}
> diff --git
> a/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
> b/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
> new file mode 100644
> index 0000000..7f6fa17
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/gl_FragCoord-pixel-center-integer.frag
> @@ -0,0 +1,12 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// [end config]
> +#version 150
> +
> +layout(pixel_center_integer) in vec4 gl_FragCoord;
> +
> +vec4 func()
> +{
> +       return gl_FragCoord;
> +}
> --
> 1.8.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130114/db50958c/attachment-0001.html>


More information about the Piglit mailing list