Module: Mesa Branch: main Commit: 6c83b9f2199e542111fd756c8f57683d9a77869a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c83b9f2199e542111fd756c8f57683d9a77869a
Author: Mike Blumenkrantz <michael.blumenkra...@gmail.com> Date: Thu Jan 4 11:27:06 2024 -0500 vk/cmd_queue: fix up indentation a little still kinda fucked Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26881> --- src/vulkan/util/vk_cmd_queue_gen.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vulkan/util/vk_cmd_queue_gen.py b/src/vulkan/util/vk_cmd_queue_gen.py index 5ac8045227c..5f77ffdaf91 100644 --- a/src/vulkan/util/vk_cmd_queue_gen.py +++ b/src/vulkan/util/vk_cmd_queue_gen.py @@ -490,8 +490,8 @@ def get_pnext_member_copy(struct, src_type, member, types, level): guard_post_stmt = "#endif" case_stmts += """ %s - case %s: - %s + case %s: + %s break; %s """ % (guard_pre_stmt, type.enum, get_struct_copy(field_name, "pnext", type.name, "sizeof(%s)" % type.name, types, level), guard_post_stmt) @@ -525,7 +525,8 @@ def get_struct_copy(dst, src_name, src_type, size, types, level=0): null_assignment = "%s = NULL;" % dst if_stmt = "if (%s) {" % src_name - return "%s\n %s\n %s\n %s\n %s \n %s } else {\n %s\n }" % (if_stmt, allocation, copy, tmp_dst, tmp_src, member_copies, null_assignment) + indent = " " * level + return "%s\n %s\n %s\n %s\n %s\n %s\n%s} else {\n %s\n%s}" % (if_stmt, allocation, copy, tmp_dst, tmp_src, member_copies, indent, null_assignment, indent) def get_struct_free(command, param, types): field_name = "cmd->u.%s.%s" % (to_struct_field_name(command.name), to_field_name(param.name))