[Piglit] [PATCH v2] built-in-constants: Add geometry shader #extension work-around for ES
Tapani Pälli
tapani.palli at intel.com
Fri Aug 26 08:18:35 UTC 2016
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
On 08/24/2016 11:58 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> I thought I had this in my previous series, but I cannot find any
> trace of it. Prevents a regression in
> tests/spec/glsl-es-3.10/minimum-maximums.txt after
> GL_OES_geometry_shader is enabled. It also fixes
> tests/spec/oes_geometry_shader/minimum-maximums.txt
>
> v2: Add extension enables to the passthrough shader too.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> tests/shaders/built-in-constants.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
> index 41d0a99..5791c7c 100644
> --- a/tests/shaders/built-in-constants.c
> +++ b/tests/shaders/built-in-constants.c
> @@ -462,6 +462,17 @@ piglit_init(int argc, char **argv)
> } else if (glsl_version < required_glsl_version)
> piglit_report_result(PIGLIT_SKIP);
>
> + /* Geometry shaders must use the #extension directive in GLSL ES
> + * before version 3.20.
> + */
> + if (es_shader && required_glsl_version < 320 &&
> + piglit_is_extension_supported("GL_OES_geometry_shader")) {
> + assert(num_required_extensions < ARRAY_SIZE(required_extensions));
> + required_extensions[num_required_extensions] =
> + strdup("GL_OES_geometry_shader");
> + num_required_extensions++;
> + }
> +
> /* Tessellation shaders must use the #extension directive. */
> const char *const tess_ext_name = es_shader
> ? "GL_OES_tessellation_shader"
> @@ -522,10 +533,12 @@ piglit_init(int argc, char **argv)
>
> (void)!asprintf(&passthrough_version_string,
> "#version %s\n"
> + "%s"
> "#ifdef GL_ES\n"
> "precision mediump float;\n"
> "#endif\n",
> - required_glsl_version_string);
> + required_glsl_version_string,
> + extension_enables);
>
>
> /* Create the shaders that will be used for the real part of the test.
>
More information about the Piglit
mailing list