vulkan/wsi: define pWaitDstStageMask in the blit submission

Otherwise we get a crash in vk_common_QueueSubmit when doing:
   .stageMask   = pSubmits[s].pWaitDstStageMask[i],

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6712
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17310>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-06-30 09:37:31 +02:00 committed by Marge Bot
parent 3f11ae93be
commit 835364ea0c
1 changed files with 3 additions and 2 deletions

View File

@ -992,8 +992,8 @@ wsi_common_queue_present(const struct wsi_device *wsi,
VkResult final_result = VK_SUCCESS;
STACK_ARRAY(VkPipelineStageFlags, stage_flags,
pPresentInfo->waitSemaphoreCount);
for (uint32_t s = 0; s < pPresentInfo->waitSemaphoreCount; s++)
MAX2(1, pPresentInfo->waitSemaphoreCount));
for (uint32_t s = 0; s < MAX2(1, pPresentInfo->waitSemaphoreCount); s++)
stage_flags[s] = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
const VkPresentRegionsKHR *regions =
@ -1086,6 +1086,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
submit_info.pSignalSemaphores = NULL;
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers = &image->buffer.blit_cmd_buffers[0];
submit_info.pWaitDstStageMask = stage_flags;
}
}