summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-09-15 15:10:54 +0100
committerJason Ekstrand <[email protected]>2017-09-22 07:47:34 -0700
commit0ac7b84672e094cb11922b6bd62b7e5e8ced52a8 (patch)
treeab067b77d8c41774e5e10911bef65a8869547d18 /src/vulkan
parent16e884d9e34ffe2c50d182297028e52b06275fa1 (diff)
vulkan: enum generator: align function declarations/prototypes
Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/util/gen_enum_to_str.py42
1 files 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 df326d0a998..aa7001ef13f 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"""),