[Piglit] [PATCH v2] built-in-constants: check required GLSL versions for #extensions
Juan A. Suarez Romero
jasuarez at igalia.com
Mon Jan 8 12:58:39 UTC 2018
Please, could someone review this patch? Thank you in advance
J.A.
On Tue, 2017-11-14 at 20:31 +0100, Juan A. Suarez Romero wrote:
> GL_OES_geometry_shader and GL_OES_tessellation_shader specifications
> require OpenGL ES Shading Language 3.10.
>
> So do not declare those extensions in shaders using older GLSL versions.
> ---
> tests/shaders/built-in-constants.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
> index d470fe1bf..32cd2638f 100644
> --- a/tests/shaders/built-in-constants.c
> +++ b/tests/shaders/built-in-constants.c
> @@ -462,6 +462,7 @@ piglit_init(int argc, char **argv)
> * before version 3.20.
> */
> if (es_shader && required_glsl_version < 320 &&
> + required_glsl_version >= 310 &&
> piglit_is_extension_supported("GL_OES_geometry_shader")) {
> assert(num_required_extensions < ARRAY_SIZE(required_extensions));
> required_extensions[num_required_extensions] =
> @@ -473,7 +474,9 @@ piglit_init(int argc, char **argv)
> const char *const tess_ext_name = es_shader
> ? "GL_OES_tessellation_shader"
> : "GL_ARB_tessellation_shader";
> - if (piglit_is_extension_supported(tess_ext_name)) {
> + if (((es_shader && required_glsl_version >= 310) ||
> + !es_shader) &&
> + piglit_is_extension_supported(tess_ext_name)) {
> assert(num_required_extensions < ARRAY_SIZE(required_extensions));
> required_extensions[num_required_extensions] =
> strdup(tess_ext_name);
More information about the Piglit
mailing list