[Piglit] [PATCH 1/5] arb_enhanced_layouts: test preprocessor define

Ilia Mirkin imirkin at alum.mit.edu
Sun Nov 1 18:05:27 PST 2015


On Sun, Nov 1, 2015 at 8:54 PM, Timothy Arceri
<timothy.arceri at collabora.com> wrote:
> From: Timothy Arceri <t_arceri at yahoo.com.au>
>
> ---
>  tests/spec/arb_enhanced_layouts/compiler/define.frag | 19 +++++++++++++++++++
>  tests/spec/arb_enhanced_layouts/compiler/define.vert | 19 +++++++++++++++++++
>  2 files changed, 38 insertions(+)
>  create mode 100644 tests/spec/arb_enhanced_layouts/compiler/define.frag
>  create mode 100644 tests/spec/arb_enhanced_layouts/compiler/define.vert
>
> diff --git a/tests/spec/arb_enhanced_layouts/compiler/define.frag b/tests/spec/arb_enhanced_layouts/compiler/define.frag
> new file mode 100644
> index 0000000..38d25da
> --- /dev/null
> +++ b/tests/spec/arb_enhanced_layouts/compiler/define.frag
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50

1.40 please (here and elsewhere). Otherwise this patch is

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

> +// require_extensions: GL_ARB_enhanced_layouts
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_enhanced_layouts: require
> +
> +#if !defined GL_ARB_enhanced_layouts
> +#  error GL_ARB_enhanced_layouts is not defined
> +#elif GL_ARB_enhanced_layouts != 1
> +#  error GL_ARB_enhanced_layouts 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_enhanced_layouts/compiler/define.vert b/tests/spec/arb_enhanced_layouts/compiler/define.vert
> new file mode 100644
> index 0000000..38d25da
> --- /dev/null
> +++ b/tests/spec/arb_enhanced_layouts/compiler/define.vert
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_enhanced_layouts
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_enhanced_layouts: require
> +
> +#if !defined GL_ARB_enhanced_layouts
> +#  error GL_ARB_enhanced_layouts is not defined
> +#elif GL_ARB_enhanced_layouts != 1
> +#  error GL_ARB_enhanced_layouts 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; }
> --
> 2.4.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list