LunarG / gfxreconstruct

Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior
https://vulkan.lunarg.com/doc/sdk/latest/linux/capture_tools.html
MIT License
389 stars 108 forks source link

Android Replay Failing with VK_GOOGLE_display_timing #200

Open dustin-lunarg opened 5 years ago

dustin-lunarg commented 5 years ago

Replay on Android for captures of apps that use the VK_GOOGLE_display_timing extensions will sometimes fail with error VK_ERROR_OUT_OF_DATE_KHR.

This issue can be reproduced with the Action RPG sample from Unreal Engine.

per-mathisen-arm commented 3 years ago

Can this be fixed by the replayer rewriting the contents of the extension data (therevy basically invalidating it)? Probably hard to reconstruct the original intent in any case.

dustin-lunarg commented 3 years ago

It's been a while since I looked at this, but I don't think that removing the extension on replay was a reliable solution. Having the extension enabled for capture could still record an image acquire order to the capture file that is different than the order that is produced by replay with the extension disabled.

dustin-lunarg commented 3 years ago

Sorry, you were asking about altering the extension data, not disabling the extension. I don't think we were able to get this to work, either, for the same reason. Something like setting desiredPresentTime to 0 on replay might produce a fifo order, but we may not have captured a fifo order. Improving swapchain support for replay is something that we should be looking at soon. Those improvements will hopefully address this issue.

dustin-lunarg commented 3 years ago

The change from #442 should prevent the OUT_OF_DATE error, without fully addressing the issue. It ensures that the image index specified to vkQueuePresentKHR is the same index that was acquired with vkAcquireNextImageKHR, but will still result in the wrong swapchain image being used for rendering when there is a mismatch between the indices acquired at capture and replay.