[Mesa-dev] [PATCH v3 1/6] vulkan: enum generator: align function declarations/prototypes

Dylan Baker dylan at pnwbakers.com
Thu Sep 21 21:28:44 UTC 2017


Thanks for updating. For the series:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Jason Ekstrand (2017-09-21 14:19:43)
> From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Acked-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/vulkan/util/gen_enum_to_str.py | 42 +++++++++++++++++++-------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py
> index df326d0..aa7001e 100644
> --- a/src/vulkan/util/gen_enum_to_str.py
> +++ b/src/vulkan/util/gen_enum_to_str.py
> @@ -64,27 +64,27 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
>  
>      % for enum in enums:
>  
> -        const char *
> -        vk_${enum.name[2:]}_to_str(${enum.name} input)
> -        {
> -            switch(input) {
> -            % for v in enum.values:
> -                % if v in FOREIGN_ENUM_VALUES:
> -
> -                #pragma GCC diagnostic push
> -                #pragma GCC diagnostic ignored "-Wswitch"
> -                % endif
> -                case ${v}:
> -                    return "${v}";
> -                % if v in FOREIGN_ENUM_VALUES:
> -                #pragma GCC diagnostic pop
> -
> -                % endif
> -            % endfor
> -            default:
> -                unreachable("Undefined enum value.");
> -            }
> +    const char *
> +    vk_${enum.name[2:]}_to_str(${enum.name} input)
> +    {
> +        switch(input) {
> +        % for v in enum.values:
> +            % if v in FOREIGN_ENUM_VALUES:
> +
> +            #pragma GCC diagnostic push
> +            #pragma GCC diagnostic ignored "-Wswitch"
> +            % endif
> +            case ${v}:
> +                return "${v}";
> +            % if v in FOREIGN_ENUM_VALUES:
> +            #pragma GCC diagnostic pop
> +
> +            % endif
> +        % endfor
> +        default:
> +            unreachable("Undefined enum value.");
>          }
> +    }
>      %endfor"""),
>      output_encoding='utf-8')
>  
> @@ -102,7 +102,7 @@ H_TEMPLATE = Template(textwrap.dedent(u"""\
>      #include <vulkan/vk_android_native_buffer.h>
>  
>      % for enum in enums:
> -        const char * vk_${enum.name[2:]}_to_str(${enum.name} input);
> +    const char * vk_${enum.name[2:]}_to_str(${enum.name} input);
>      % endfor
>  
>      #endif"""),
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170921/2094f0c1/attachment.sig>


More information about the mesa-dev mailing list