dzn: Pass the dzn_event pointer to _mesa_hash_table_insert()

The key is supposed to be the dzn_event pointer, not the VkEvent
object, even if they do match in practice on 64bit builds.

Fixes: a012b21964 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
This commit is contained in:
Boris Brezillon 2022-04-22 10:57:42 -07:00 committed by Marge Bot
parent cb9ad71d75
commit 3328f6be06

View file

@ -3880,7 +3880,7 @@ dzn_CmdResetEvent(VkCommandBuffer commandBuffer,
struct dzn_device *device = container_of(cmdbuf->vk.base.device, struct dzn_device, vk);
VK_FROM_HANDLE(dzn_event, evt, event);
if (!_mesa_hash_table_insert(cmdbuf->events.ht, event, (void *)(uintptr_t)DZN_EVENT_STATE_RESET))
if (!_mesa_hash_table_insert(cmdbuf->events.ht, evt, (void *)(uintptr_t)DZN_EVENT_STATE_RESET))
cmdbuf->error = vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
}
@ -3893,7 +3893,7 @@ dzn_CmdSetEvent(VkCommandBuffer commandBuffer,
struct dzn_device *device = container_of(cmdbuf->vk.base.device, struct dzn_device, vk);
VK_FROM_HANDLE(dzn_event, evt, event);
if (!_mesa_hash_table_insert(cmdbuf->events.ht, event, (void *)(uintptr_t)DZN_EVENT_STATE_SET))
if (!_mesa_hash_table_insert(cmdbuf->events.ht, evt, (void *)(uintptr_t)DZN_EVENT_STATE_SET))
cmdbuf->error = vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
}