[Mesa-dev] [PATCH] mesa: Rename MESA_shader_integer_mix to EXT_shader_integer_mix

Ian Romanick idr at freedesktop.org
Thu Sep 12 13:57:42 PDT 2013


On 09/12/2013 12:01 PM, Roland Scheidegger wrote:
> Am 12.09.2013 18:47, schrieb Ian Romanick:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> Everyone at the Khronos meeting was as surprised that GLSL didn't
>> already support this as we were.  Several vendors said they'd ship it,
>> but there didn't seem to be enough interest to put in the effort to make
>> it ARB or KHR.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> Cc: Matt Turner <mattst88 at gmail.com>
>> ---
>>  docs/specs/MESA_shader_integer_mix.spec      | 19 +++++++++++--------
>>  src/glsl/builtin_functions.cpp               |  2 +-
>>  src/glsl/glcpp/glcpp-parse.y                 |  4 ++--
>>  src/glsl/glsl_parser_extras.cpp              |  2 +-
>>  src/glsl/glsl_parser_extras.h                |  4 ++--
>>  src/mesa/drivers/dri/i965/intel_extensions.c |  2 +-
>>  src/mesa/main/extensions.c                   |  2 +-
>>  src/mesa/main/mtypes.h                       |  2 +-
>>  8 files changed, 20 insertions(+), 17 deletions(-)
>>
>> diff --git a/docs/specs/MESA_shader_integer_mix.spec b/docs/specs/MESA_shader_integer_mix.spec
>> index d381ddd..f2f903b 100644
>> --- a/docs/specs/MESA_shader_integer_mix.spec
>> +++ b/docs/specs/MESA_shader_integer_mix.spec
>> @@ -1,10 +1,10 @@
>>  Name
>>  
>> -    MESA_shader_integer_mix
>> +    EXT_shader_integer_mix
>>  
>>  Name Strings
>>  
>> -    GL_MESA_shader_integer_mix
>> +    GL_EXT_shader_integer_mix
>>  
>>  Contact
>>  
>> @@ -21,12 +21,12 @@ Status
>>  
>>  Version
>>  
>> -    Last Modified Date:         09/09/2013
>> -    Author Revision:            5
>> +    Last Modified Date:         09/12/2013
>> +    Author Revision:            6
>>  
>>  Number
>>  
>> -    
>> +    TBD
>>  
>>  Dependencies
>>  
>> @@ -78,18 +78,18 @@ Modifications to The OpenGL Shading Language Specification, Version 4.40
>>      Including the following line in a shader can be used to control the
>>      language features described in this extension:
>>  
>> -      #extension GL_MESA_shader_integer_mix : <behavior>
>> +      #extension GL_EXT_shader_integer_mix : <behavior>
>>  
>>      where <behavior> is as specified in section 3.3.
>>  
>>      New preprocessor #defines are added to the OpenGL Shading Language:
>>  
>> -      #define GL_MESA_shader_integer_mix        1
>> +      #define GL_EXT_shader_integer_mix        1
>>  
>>  Interactions with ARB_ES3_compatibility
>>  
>>      On desktop implementations that support ARB_ES3_compatibility,
>> -    GL_MESA_shader_integer_mix can be enabled (and the new functions
>> +    GL_EXT_shader_integer_mix can be enabled (and the new functions
>>      used) in shaders declared with '#version 300 es'.
>>  
>>  GLX Protocol
>> @@ -124,6 +124,9 @@ Revision History
>>  
>>      Rev.    Date      Author    Changes
>>      ----  --------    --------  ---------------------------------------------
>> +      6   09/12/2013  idr       After discussions in Khronso, change vendor
>> +                                prefix to EXT.
> Khronso->Khronos

Oops.

>> +
>>        5   09/09/2013  idr       Add ARB_ES3_compatibility interaction.
>>  
>>        4   09/06/2013  mattst88  Allow extension on OpenGL ES 3.0.
>> diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
>> index ce78df1..e005a95 100644
>> --- a/src/glsl/builtin_functions.cpp
>> +++ b/src/glsl/builtin_functions.cpp
>> @@ -190,7 +190,7 @@ shader_bit_encoding(const _mesa_glsl_parse_state *state)
>>  static bool
>>  shader_integer_mix(const _mesa_glsl_parse_state *state)
>>  {
>> -   return v130(state) && state->MESA_shader_integer_mix_enable;
>> +   return v130(state) && state->EXT_shader_integer_mix_enable;
>>  }
>>  
>>  static bool
>> diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
>> index fb1c1d0..6eaa5f9 100644
>> --- a/src/glsl/glcpp/glcpp-parse.y
>> +++ b/src/glsl/glcpp/glcpp-parse.y
>> @@ -1246,8 +1246,8 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
>>  	      if (extensions->ARB_shading_language_420pack)
>>  	         add_builtin_define(parser, "GL_ARB_shading_language_420pack", 1);
>>  
>> -	      if (extensions->MESA_shader_integer_mix)
>> -	         add_builtin_define(parser, "GL_MESA_shader_integer_mix", 1);
>> +	      if (extensions->EXT_shader_integer_mix)
>> +	         add_builtin_define(parser, "GL_EXT_shader_integer_mix", 1);
>>  	   }
>>  	}
>>  
>> diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
>> index 1e4d7c7..1f5900b 100644
>> --- a/src/glsl/glsl_parser_extras.cpp
>> +++ b/src/glsl/glsl_parser_extras.cpp
>> @@ -517,7 +517,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
>>     EXT(ARB_texture_query_lod,          true,  false,     ARB_texture_query_lod),
>>     EXT(ARB_gpu_shader5,                true,  false,     ARB_gpu_shader5),
>>     EXT(AMD_vertex_shader_layer,        true,  false,     AMD_vertex_shader_layer),
>> -   EXT(MESA_shader_integer_mix,        true,   true,     MESA_shader_integer_mix),
>> +   EXT(EXT_shader_integer_mix,        true,   true,      EXT_shader_integer_mix),
> Formatting looks wrong.

Yes... the spaces were off in the original, and I made them worse.

>>  };
>>  
>>  #undef EXT
>> diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
>> index 15abbbc..2e2440a 100644
>> --- a/src/glsl/glsl_parser_extras.h
>> +++ b/src/glsl/glsl_parser_extras.h
>> @@ -315,8 +315,8 @@ struct _mesa_glsl_parse_state {
>>     bool AMD_vertex_shader_layer_warn;
>>     bool ARB_shading_language_420pack_enable;
>>     bool ARB_shading_language_420pack_warn;
>> -   bool MESA_shader_integer_mix_enable;
>> -   bool MESA_shader_integer_mix_warn;
>> +   bool EXT_shader_integer_mix_enable;
>> +   bool EXT_shader_integer_mix_warn;
>>     /*@}*/
>>  
>>     /** Extensions supported by the OpenGL implementation. */
>> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
>> index 8cb3f1b..aef7805 100644
>> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
>> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
>> @@ -157,7 +157,7 @@ intelInitExtensions(struct gl_context *ctx)
>>     if (brw->gen >= 5) {
>>        ctx->Extensions.ARB_texture_query_lod = true;
>>        ctx->Extensions.EXT_timer_query = true;
>> -      ctx->Extensions.MESA_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
>> +      ctx->Extensions.EXT_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
>>     }
>>  
>>     if (ctx->API == API_OPENGL_CORE)
>> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
>> index 88fcde3..34615e3 100644
>> --- a/src/mesa/main/extensions.c
>> +++ b/src/mesa/main/extensions.c
>> @@ -201,6 +201,7 @@ static const struct extension extension_table[] = {
>>     { "GL_EXT_secondary_color",                     o(dummy_true),                              GLL,            1999 },
>>     { "GL_EXT_separate_shader_objects",             o(EXT_separate_shader_objects),             GLL,            2008 },
>>     { "GL_EXT_separate_specular_color",             o(dummy_true),                              GLL,            1997 },
>> +   { "GL_EXT_shader_integer_mix",                  o(EXT_shader_integer_mix),                  GL       | ES3, 2013 },
>>     { "GL_EXT_shadow_funcs",                        o(ARB_shadow),                              GLL,            2002 },
>>     { "GL_EXT_stencil_two_side",                    o(EXT_stencil_two_side),                    GLL,            2001 },
>>     { "GL_EXT_stencil_wrap",                        o(dummy_true),                              GLL,            2002 },
>> @@ -311,7 +312,6 @@ static const struct extension extension_table[] = {
>>     { "GL_IBM_texture_mirrored_repeat",             o(dummy_true),                              GLL,            1998 },
>>     { "GL_INGR_blend_func_separate",                o(EXT_blend_func_separate),                 GLL,            1999 },
>>     { "GL_MESA_pack_invert",                        o(MESA_pack_invert),                        GL,             2002 },
>> -   { "GL_MESA_shader_integer_mix",                 o(MESA_shader_integer_mix),                 GL       | ES3, 2013 },
>>     { "GL_MESA_texture_array",                      o(MESA_texture_array),                      GLL,            2007 },
>>     { "GL_MESA_texture_signed_rgba",                o(EXT_texture_snorm),                       GL,             2009 },
>>     { "GL_MESA_window_pos",                         o(dummy_true),                              GLL,            2000 },
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index ca7111e..49a01d3 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -3125,6 +3125,7 @@ struct gl_extensions
>>     GLboolean EXT_point_parameters;
>>     GLboolean EXT_provoking_vertex;
>>     GLboolean EXT_separate_shader_objects;
>> +   GLboolean EXT_shader_integer_mix;
>>     GLboolean EXT_stencil_two_side;
>>     GLboolean EXT_texture3D;
>>     GLboolean EXT_texture_array;
>> @@ -3154,7 +3155,6 @@ struct gl_extensions
>>     GLboolean ATI_fragment_shader;
>>     GLboolean ATI_separate_stencil;
>>     GLboolean MESA_pack_invert;
>> -   GLboolean MESA_shader_integer_mix;
>>     GLboolean MESA_texture_array;
>>     GLboolean MESA_ycbcr_texture;
>>     GLboolean NV_conditional_render;
>>
> 
> Shouldn't MESA_shader_integer_mix.spec be renamed too?

Dang it.  I had meant to do that as part of the commit, but I forgot.

> Otherwise looks good to me.
> 
> Roland
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list