[Piglit] [PATCH 10/15] shader_runner: Add GLES workarounds (v2)

Eric Anholt eric at anholt.net
Tue Dec 11 14:00:47 PST 2012


Chad Versace <chad.versace at linux.intel.com> writes:
> diff --git a/tests/shaders/shader_runner_gles_workarounds.h b/tests/shaders/shader_runner_gles_workarounds.h
> new file mode 100644
> index 0000000..9a33d21
> --- /dev/null
> +++ b/tests/shaders/shader_runner_gles_workarounds.h
> @@ -0,0 +1,136 @@

> +static void __attribute__((unused))
> +unsupported_function(const char *name)
> +{
> +	printf("Function \"%s\" not supported on this implementation\n", name);
> +	piglit_report_result(PIGLIT_SKIP);
> +}

doesn't unsupported_function() get reported as an unused static function
in the non-es3 build?

> +#if defined(PIGLIT_USE_OPENGL_ES3)

> +#define glBindProgramARB(a, b) \
> +	/* Custom definition to suppress unused-variable warnings. */ \
> +	({ \
> +	 	(void) a; \
> +	 	(void) b; \
> +		unsupported_function("glBindProgramARB"); \
> +	 })
> +
> +#define glVertexPointer(a, b, c, d) \
> +	/* Custom definition to suppress unused-variable warnings. */ \
> +	({ \
> +	 	(void) a; \
> +	 	(void) b; \
> +	 	(void) c; \
> +	 	(void) d; \
> +		unsupported_function("glVertexPointer"); \
> +	 })

Wouldn't actual functions avoid the need for this silliness?

> +#endif /*PIGLIT_USE_OPENGL*/

/* PIGLIT_USE_OPENGL_ES3 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121211/9b237066/attachment.pgp>


More information about the Piglit mailing list