turnip: Fix compiler warning about casting a nondispatchable handle.
authorEric Anholt <eric@anholt.net>
Sat, 22 Feb 2020 00:38:26 +0000 (16:38 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 16:58:50 +0000 (16:58 +0000)
Fixes: 1c5d84fcae71 ("turnip: hook up cmdbuffer event set/wait")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3916>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3916>

src/freedreno/vulkan/tu_cmd_buffer.c

index 9bda41d4d063b38387963597e8a54ff8acfb3f9c..2a513c911f435312998abcc13de3c7e013b74adf 100644 (file)
@@ -4113,7 +4113,7 @@ tu_CmdWaitEvents(VkCommandBuffer commandBuffer,
    /* TODO: any flush required before/after? (CP_WAIT_FOR_ME?) */
 
    for (uint32_t i = 0; i < eventCount; i++) {
-      const struct tu_event *event = (const struct tu_event*) pEvents[i];
+      TU_FROM_HANDLE(tu_event, event, pEvents[i]);
 
       tu_bo_list_add(&cmd->bo_list, &event->bo, MSM_SUBMIT_BO_READ);