v3dv: fix crash on 32-bit builds

Command buffer private object destroy callbacks receive a 64-integer so their
signature should respect that to avoid alignment issues when passing pointers.
This is the same we were already doing for color pipelines, but now for D/S
pipelines too.

Fixes crash on 32-bit build with:
dEQP-VK.synchronization2.op.single_queue.fence.write_clear_attachments_read_copy_image_to_buffer.image_128x128_d16_unorm

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33463>
This commit is contained in:
Iago Toral Quiroga
2025-02-10 09:10:12 +01:00
committed by Marge Bot
parent c5cad407f8
commit daa48cbaef
+4 -2
View File
@@ -220,9 +220,11 @@ destroy_color_clear_pipeline(VkDevice _device,
static void
destroy_depth_clear_pipeline(VkDevice _device,
struct v3dv_meta_depth_clear_pipeline *p,
uint64_t pipeline,
VkAllocationCallbacks *alloc)
{
struct v3dv_meta_depth_clear_pipeline *p =
(struct v3dv_meta_depth_clear_pipeline *)(uintptr_t)pipeline;
v3dv_DestroyPipeline(_device, p->pipeline, alloc);
vk_free(alloc, p);
}
@@ -306,7 +308,7 @@ v3dv_meta_clear_finish(struct v3dv_device *device)
hash_table_foreach(device->meta.depth_clear.cache, entry) {
struct v3dv_meta_depth_clear_pipeline *item = entry->data;
destroy_depth_clear_pipeline(_device, item, &device->vk.alloc);
destroy_depth_clear_pipeline(_device, (uintptr_t)item, &device->vk.alloc);
}
_mesa_hash_table_destroy(device->meta.depth_clear.cache, NULL);
}