tu: kgsl: fix -Wgnu-alignof-expression warning with Clang

Fixes:

src/freedreno/vulkan/tu_knl_kgsl.cc:1455:16:
  error: 'alignof' applied to an expression is a GNU extension [-Werror,-Wgnu-alignof-expression]
  alignof(*objs), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
This commit is contained in:
Gurchetan Singh 2026-05-11 16:35:21 -07:00 committed by Marge Bot
parent f9a5524b3b
commit 1084ddd893

View file

@ -1452,7 +1452,8 @@ kgsl_queue_submit(struct tu_queue *queue, void *_submit,
struct kgsl_command_object *objs = (struct kgsl_command_object *)
vk_alloc(&queue->device->vk.alloc, sizeof(*objs) * obj_count,
alignof(*objs), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
alignof(struct kgsl_command_object),
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
struct kgsl_cmdbatch_profiling_buffer *profiling_buffer = NULL;
uint32_t obj_idx = 0;