Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix capture deadlock when vkQueuePresentKHR unlocks a CPU wait #1708

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Commits on Sep 4, 2024

  1. Fix capture of Vulkan-Sample "timeline_semaphore"

    In a situation where you have two threads:
    - one waiting on a synchronization primitive (`VkSemaphore`, `VkFence`....)
    - another on which a call to `vkQueuePresentKHR` is necessary to signal that primitive
    
    Then if the "CPU waiting call" (`vkWaitForFences`, `vkWaitSemaphores`...) is reached by
    thread 1 before `vkQueuePresentKHR` is reached by thread 2, the `api_call_mutex_` of the
    `CaptureManager` is locked by the CPU waiting call which makes it impossible to lock
    by the call to `vkQueuePresentKHR` (which is always an exclusive lock) and we end up in
    a deadlock situation.
    
    I don't see why the lock inside `vkQueuePresentKHR` should be exclusive, so I propose to
    solve this issue by simply using the same system of shared lock as for all the other
    calls.
    
    Change-Id: I3b8e9e9c569b578564fa3529d42800b586f54191
    marius-pelegrin-arm committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    e5edaef View commit details
    Browse the repository at this point in the history