[Mesa-dev] [PATCH v2 02/18] mesa/extensions: Wrap array entries in macros

Chad Versace chad.versace at intel.com
Wed Nov 11 14:23:49 PST 2015


On Fri 30 Oct 2015, Nanley Chery wrote:
> From: Nanley Chery <nanley.g.chery at intel.com>
> 
> Now that we're using macros, remove the redundant text from each entry.
> 
> Remove comments between the entries to make editing easier and separate
> the sections with blank lines. Structure the EXT macros in a way that
> helps reviewers verify that no meaning has been altered.
> 
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/mesa/main/extensions.c | 645 +++++++++++++++++++++++----------------------
>  1 file changed, 323 insertions(+), 322 deletions(-)
> 
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 389bbb0..fb4d791 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -83,328 +83,329 @@ struct extension {
>   * \brief Table of supported OpenGL extensions for all API's.
>   */
>  static const struct extension extension_table[] = {
> -   /* ARB Extensions */
> -   { "GL_ARB_ES2_compatibility",                   o(ARB_ES2_compatibility),                   GL,             2009 },
> -   { "GL_ARB_ES3_compatibility",                   o(ARB_ES3_compatibility),                   GL,             2012 },
[...]
> -   { "GL_SGIS_texture_lod",                        o(dummy_true),                              GLL,            1997 },
> -   { "GL_SUN_multi_draw_arrays",                   o(dummy_true),                              GLL,            1999 },
> +#define EXT(name_str, driver_cap, api_flags, yyyy) \
> +        { .name = "GL_" #name_str, .offset = o(driver_cap), .api_set = api_flags, .year = yyyy},
> +EXT(ARB_ES2_compatibility                   , ARB_ES2_compatibility                  , GL                   , 2009)
> +EXT(ARB_ES3_compatibility                   , ARB_ES3_compatibility                  , GL                   , 2012)
[...]

Each EXT line is an array entry. Please indent it as such, just like the
old array entries that the patch replaces.

With some indentation, this patch is
Reviewed-by: Chad Versace <chad.versace at intel.com>


More information about the mesa-dev mailing list