[Piglit] [PATCH 2/3] arb_vertex_attrib_64bit: add simple preprocessor tests

Ilia Mirkin imirkin at alum.mit.edu
Mon Feb 23 17:45:50 PST 2015


Hm, a bit odd that it's enableable and supported in frag, but I guess
it's OK. I don't see anything in the extension spec that would specify
otherwise...

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Feb 23, 2015 at 8:26 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This just tests the preprocessor defines appear in the shaders.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  .../arb_vertex_attrib_64bit/preprocessor/define.frag  | 19 +++++++++++++++++++
>  .../arb_vertex_attrib_64bit/preprocessor/define.vert  | 19 +++++++++++++++++++
>  2 files changed, 38 insertions(+)
>  create mode 100644 tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
>  create mode 100644 tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert
>
> diff --git a/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
> new file mode 100644
> index 0000000..9bd723b
> --- /dev/null
> +++ b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.frag
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_vertex_attrib_64bit
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_vertex_attrib_64bit: require
> +
> +#if !defined GL_ARB_vertex_attrib_64bit
> +#  error GL_ARB_vertex_attrib_64bit is not defined
> +#elif GL_ARB_vertex_attrib_64bit != 1
> +#  error GL_ARB_vertex_attrib_64bit is not equal to 1
> +#endif
> +
> +/* Some compilers generate spurious errors if a shader does not contain
> + * any code or declarations.
> + */
> +int foo(void) { return 1; }
> diff --git a/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert
> new file mode 100644
> index 0000000..9bd723b
> --- /dev/null
> +++ b/tests/spec/arb_vertex_attrib_64bit/preprocessor/define.vert
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_vertex_attrib_64bit
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_vertex_attrib_64bit: require
> +
> +#if !defined GL_ARB_vertex_attrib_64bit
> +#  error GL_ARB_vertex_attrib_64bit is not defined
> +#elif GL_ARB_vertex_attrib_64bit != 1
> +#  error GL_ARB_vertex_attrib_64bit is not equal to 1
> +#endif
> +
> +/* Some compilers generate spurious errors if a shader does not contain
> + * any code or declarations.
> + */
> +int foo(void) { return 1; }
> --
> 1.9.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list