Skip to content

vulkan: Track swapchain present fences for offscreen replay synchronization - #35

Open
olehkuznetsov wants to merge 1 commit into
android-graphics:devfrom
olehkuznetsov:fix-offscreen-present-fence
Open

vulkan: Track swapchain present fences for offscreen replay synchronization#35
olehkuznetsov wants to merge 1 commit into
android-graphics:devfrom
olehkuznetsov:fix-offscreen-present-fence

Conversation

@olehkuznetsov

Copy link
Copy Markdown

Summary

This PR fixes replay synchronization hangs during frame looping when using offscreen/virtual swapchains (or default --swapchain offscreen mode):

  • Present Fence Shadow Tracking: Moved VkSwapchainPresentFenceInfoEXT / KHR fence handling in VulkanReplayConsumerBase::OverrideQueuePresentKHR outside of options_.surface_index != -1 scope. When using --swapchain offscreen or virtual swapchains, present fences are now recorded in shadow_fences_ so subsequent fence waits (vkWaitForFences / vkGetFenceStatus) do not block indefinitely.
  • Bounds & Null Safety: Added null verification and bounds clamping against pFences.GetLength() and swapchainCount when decoding present fence arrays.

Testing

  • Validated with frame_loop_validation.py on Android with offscreen swapchain frame looping.

…zation

- Track VkSwapchainPresentFenceInfoEXT/KHR fences in shadow_fences_ regardless of surface_index, preventing replay hangs on offscreen swapchain present fences.
- Add null checks and bounds verification when decoding present fence arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant