mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 04:28:17 +02:00
radv/sqtt: forward zero-submit-count vkQueueSubmit2 for SQTT capture
Vulkan applications use vkQueueSubmit2(submitCount=0) to signal throttle fences (e.g. per-image frame-pacing fences). When SQTT is enabled, sqtt_QueueSubmit2() skips both the bypass path and the submit loop, so the call is never forwarded and the fence remains unsignaled. This causes hangs in drmSyncobjWait (WAIT_FOR_SUBMIT) after capture. Forward submitCount==0 calls directly to the underlying QueueSubmit2 to ensure the fence is signaled. Signed-off-by: jyotiranjan <jyotiranjan.bhuyan@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41766>
This commit is contained in:
parent
05cd2b9509
commit
a5d34f85f8
1 changed files with 8 additions and 2 deletions
|
|
@ -751,8 +751,6 @@ radv_sqtt_wsi_submit(VkQueue _queue, uint32_t submitCount, const VkSubmitInfo2 *
|
|||
FREE(new_cmdbufs);
|
||||
}
|
||||
|
||||
if (submitCount == 0 && _fence != VK_NULL_HANDLE)
|
||||
result = device->layer_dispatch.rgp.QueueSubmit2(_queue, 0, NULL, _fence);
|
||||
|
||||
return result;
|
||||
|
||||
|
|
@ -773,6 +771,14 @@ sqtt_QueueSubmit2(VkQueue _queue, uint32_t submitCount, const VkSubmitInfo2 *pSu
|
|||
VkCommandBufferSubmitInfo *new_cmdbufs = NULL;
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
/* Vulkan apps use vkQueueSubmit2(submitCount=0, fence) to signal per-image
|
||||
* throttle fences. During SQTT capture, our wrap loop iterates 0 times
|
||||
* and would never forward this call, leaving the fence unsignaled and
|
||||
* hanging the next frame's vkWaitForFences. Always forward such calls.
|
||||
*/
|
||||
if (submitCount == 0 && _fence != VK_NULL_HANDLE)
|
||||
return device->layer_dispatch.rgp.QueueSubmit2(_queue, 0, NULL, _fence);
|
||||
|
||||
/* Only consider queue events on graphics/compute when enabled. */
|
||||
if (((!device->sqtt_enabled || !radv_sqtt_queue_events_enabled()) && !instance->vk.trace_per_submit) ||
|
||||
!is_gfx_or_ace)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue