[Piglit] [PATCH] glsl-1.10: Put an if-statement in a macro in the false path of an ifdef

Timothy Arceri tarceri at itsqueeze.com
Sat Sep 1 03:43:37 UTC 2018


Thanks!

I believe I have a fix I'm just running it in CI to confirm it doesn't 
cause any other issues.

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 01/09/18 03:49, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Cc: Eero Tamminen <eero.t.tamminen at intel.com>
> Cc: Mark Janes <mark.a.janes at intel.com>
> ---
>   .../if-statement-in-macro-in-false-ifdef.vert          | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>   create mode 100644 tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert
> 
> diff --git a/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert b/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert
> new file mode 100644
> index 000000000..938fe31f8
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert
> @@ -0,0 +1,18 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.10
> +// [end config]
> +//
> +// Reproduces https://bugs.freedesktop.org/show_bug.cgi?id=107772
> +
> +#version 110
> +
> +#ifdef NOT_DEFINED
> +#define A_MACRO(x) \
> +	if (x)
> +#endif
> +
> +void main()
> +{
> +    gl_Position = vec4(0);
> +}
> 


More information about the Piglit mailing list