gfxreconstruct icon indicating copy to clipboard operation
gfxreconstruct copied to clipboard

--sync for Capture

Open andrew-lunarg opened this issue 1 year ago • 3 comments

An option for capture:

    GFXRECON_SYNC

...which does at capture time what --sync does at replay: "Synchronize after each queue submission with vkQueueWaitIdle."

This would let us capture a more correct trace from apps which issue a sequence of command with the potential to delete or reset resources still in-flight on the GPU. An app could work fine on its own and at capture but then fail or fail to validate at replay because replay issues the commands faster than the original app did and thus wins (or loses) a race against the GPU.

Rather than fixing this at replay, doing it at capture lets us have a conservatively good trace that the app couldn't have made on its own. Once we have an app that's known to need --sync to replay safely, going back and recapturing with GFXRECON_SYNC is less error-prone and more automatic than shipping the instruction to use --sync around with the binary trace file.

We probably want to record the wait idle into the capture, which is equivalent to forcing --sync on replay.

We might want to do a vkDeviceWaitIdle to account for multiple threads bashing on different queues in a potential future multithreaded replay.

andrew-lunarg avatar Mar 16 '23 23:03 andrew-lunarg