[Mesa-dev] [PATCH 5/5] glcpp: Define GL_EXT_shader_integer_mix in both GL and ES.

Ian Romanick idr at freedesktop.org
Tue Jan 21 15:28:27 PST 2014


This is a good fix for now.  I'd really like for this code to be
table-driven.  We have similar code in the compiler for the extensions
that can be enabled.  We ought to be able to unify those paths... an
extension can be enabled iff it's #define is available.

On 01/17/2014 09:09 PM, Matt Turner wrote:
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/glsl/glcpp/glcpp-parse.y | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
> index 427fdec..995427a 100644
> --- a/src/glsl/glcpp/glcpp-parse.y
> +++ b/src/glsl/glcpp/glcpp-parse.y
> @@ -2100,9 +2100,6 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
>  	      if (extensions->ARB_sample_shading)
>  	         add_builtin_define(parser, "GL_ARB_sample_shading", 1);
>  
> -	      if (extensions->EXT_shader_integer_mix)
> -	         add_builtin_define(parser, "GL_EXT_shader_integer_mix", 1);
> -
>  	      if (extensions->ARB_texture_gather)
>  	         add_builtin_define(parser, "GL_ARB_texture_gather", 1);
>  
> @@ -2114,6 +2111,11 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
>  	   }
>  	}
>  
> +	if (extensions != NULL) {
> +	   if (extensions->EXT_shader_integer_mix)
> +	      add_builtin_define(parser, "GL_EXT_shader_integer_mix", 1);
> +	}
> +
>  	if (version >= 150)
>  		add_builtin_define(parser, "GL_core_profile", 1);
>  
> 



More information about the mesa-dev mailing list