feat(plugin): add state loading complete event to plugin ABI#9
feat(plugin): add state loading complete event to plugin ABI#9shukangz wants to merge 2 commits into
Conversation
Add GFXR_REPLAY_EVENT_STATE_LOADING_COMPLETE to notify external modules when the initial state loading has completed during Vulkan replays. This update includes the event struct definition, integration with the replay event sink, and relevant test coverage.
olehkuznetsov
left a comment
There was a problem hiding this comment.
Why do we need this? Why it doesn't work with GFXR_REPLAY_EVENT_FRAME_BEGIN ?
setup is not guaranteed to be present in non trimmed captures and also this approach will not work if we have multiframe capture and want to export to render doc 3rd frame./
|
You are right that "state setup" may not exist in an untrimmed trace, but using FRAME_BEGIN on trimmed traces have complexities. In a trimmed capture (e.g., a capture of frames 100–105), the first replayed frame (index 0) contains a large "state setup" block. This block recreates all Vulkan resources (devices, buffers, textures, descriptor sets, etc.) to match their state at the start of the trim. If we start capturing at FRAME_BEGIN, which fires before the frame's blocks are replayed, RenderDoc will capture all of these setup API calls. This pollutes the captured frame with thousands of resource creation calls. If using frame looping to avoid the "state setup" block, the resulting .rdc file would contain large initial state blocks of raw pixel buffers from previous loop iterations. The capture time would be longer for more replaying. This may not be concern today but may grow into one if we extend the support to multiple frame capture later. See discussion at [1]. I have write the RenderDoc plugin so it can support both trimmed (triggered by STATE_LOADING_COMPLETE) and untrimmed traces (triggered by FRAME_BEGIN). Please see [1] https://docs.google.com/document/d/1f32495O7CU27rEGWEOvLpiEfBU8ARt5RDyT13FHaPFc/edit?resourcekey=0--HC4JFRwnTrNiDQOSjRY5g&disco=AAAB-u3ol-o |
Let's insted fix FRAME_BEGIN, so, it doesn't include setup state. Alternatively, you can try to start capture not on the FRAME BEGIN envet, but on the first Queue Submit of the frame. |
|
I agree that the first proposal (fixing However, since we are maintaining a fork of LunarG's Regarding the alternative proposal (starting capture at the first Given our tight schedule and fork-maintenance requirements, I propose the following compromise:
I can push a quick commit to add the temporary note right now if this sounds like a good path forward. |
We should just upstream FRAME_BEGIN fix. For queue submit - I think it works a bit differently.
My expectation is you just need first queue submit event, after FRAME_BEGIN. It should work even without FRAME_BEGIN event fix. |
Add GFXR_REPLAY_EVENT_STATE_LOADING_COMPLETE to notify external modules when the initial state loading has completed during Vulkan replays.
This update includes the event struct definition, integration with the replay event sink, and relevant test coverage.