mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 17:10:32 +01:00
vulkan/cmd_queue: Reorder memcpy in get_struct_copy
Using the temporary variable for the memcpy makes sure they are always used so the "(void)tmp_src123" can be removed. Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36331>
This commit is contained in:
parent
d29f446aa3
commit
656acb96b0
1 changed files with 3 additions and 3 deletions
|
|
@ -546,9 +546,9 @@ def get_struct_copy(builder, dst, src_name, src_type, size, types):
|
|||
|
||||
builder.add("%s = vk_zalloc(queue->alloc, %s, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);" % (dst, size))
|
||||
builder.add("if (%s == NULL) goto err;" % (dst))
|
||||
builder.add("memcpy((void*)%s, %s, %s);" % (dst, src_name, size))
|
||||
builder.add("%s *%s = (void *) %s; (void) %s;" % (src_type, tmp_dst_name, dst, tmp_dst_name))
|
||||
builder.add("%s *%s = (void *) %s; (void) %s;" % (src_type, tmp_src_name, src_name, tmp_src_name))
|
||||
builder.add("%s *%s = (void *)%s;" % (src_type, tmp_dst_name, dst))
|
||||
builder.add("%s *%s = (void *)%s;" % (src_type, tmp_src_name, src_name))
|
||||
builder.add("memcpy(%s, %s, %s);" % (tmp_dst_name, tmp_src_name, size))
|
||||
|
||||
if src_type in types:
|
||||
for member in types[src_type].members:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue