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
414 stars 123 forks source link

[replay] Pausing on the first frame requires unpausing twice #1767

Open w-pearson opened 1 month ago

w-pearson commented 1 month ago

Describe the replay bug: When pausing replay on the first frame, the automatic pause triggers twice and needs to be manually unpaused twice.

Verify before submission:

Build Environment: Tested 5583aee63f68c4da0e0dd288db3c596c49056052 and cc728336535270a79d55b74d8547ce94d03743d0 (v1.0.4).

To Reproduce Steps to reproduce the behavior:

  1. Create a GFXR file. I've mainly used Khronos vulkan samples for this. The capture can be done with a manual --trigger or with --trigger-frames or as a full capture.
  2. Run gfxrecon-replay with --pause or --pause-frame 1.
  3. Note "Paused at frame 1" in the log
  4. Press space once
  5. Note "Paused at frame 1" appears a second time in the log
  6. Press space again
  7. The capture will play to completion

System environment:

Additional information (optional):

This does not happen when using --pause-frame 2 or other values. --pause-frame 0 never pauses. (I don't think #1195 is relevant here).

Both pauses are triggered by Application::PlaySingleFrame (and not by SetPaused; see #578); file_processor_->GetCurrentFrameNumber() returns 1 twice.

w-pearson commented 1 month ago

I did a bit more testing, and even a capture from v1.0.0 (21dc82d5ec98cad73d1cc55f20939f92c9f74f34) experiences this issue when replayed on c2b4bec49f1ad876bf970cc4d9af8d625d3096ff or newer.