Skip to content

dump-resources: override query commands for replay dumps#2945

Merged
fabian-lunarg merged 3 commits into
LunarG:devfrom
dnlbaines:query-commands
Jun 16, 2026
Merged

dump-resources: override query commands for replay dumps#2945
fabian-lunarg merged 3 commits into
LunarG:devfrom
dnlbaines:query-commands

Conversation

@dnlbaines

Copy link
Copy Markdown
Contributor

Add dump-resources overrides for query-related Vulkan commands so generated replay code passes tracked object info into the dumper. The overrides replay query commands for dispatch/trace-rays dump contexts and avoid ending queries that were never begun, which fixes crashes during resource dumping.

@dnlbaines
dnlbaines requested a review from a team as a code owner May 12, 2026 12:49
@CLAassistant

CLAassistant commented May 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@fabian-lunarg fabian-lunarg added the approved-to-run-ci Can run CI check on internal LunarG machines label May 12, 2026
@fabian-lunarg fabian-lunarg self-assigned this May 12, 2026
Comment thread framework/generated/generated_vulkan_replay_dump_resources.cpp

@fabian-lunarg fabian-lunarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the fix ("avoid ending queries that were never begun")
and the added overrides.
PR looks good to me, previous code-gen'ed behavior is
now handled in overrides with good code-reuse (e.g. ForEachDrawCallCommandBuffer).
I'm happy but @panos-lunarg might want to double-check

Comment thread framework/decode/vulkan_replay_dump_resources.cpp
Comment thread framework/decode/vulkan_replay_dump_resources.h Outdated
Comment thread framework/decode/vulkan_replay_dump_resources.h Outdated
@fabian-lunarg

Copy link
Copy Markdown
Contributor

last but not least:

@dnlbaines could you maybe provide a repro-case (.gfxr + input .json that crashes without this PR, or instructions how-to reproduce ourselves), adding to our (internal) test-coverage?

@dnlbaines

Copy link
Copy Markdown
Contributor Author

last but not least:

@dnlbaines could you maybe provide a repro-case (.gfxr + input .json that crashes without this PR, or instructions how-to reproduce ourselves), adding to our (internal) test-coverage?

I can't share it publicly as its from an internal demo but I have uploaded it to share.lunarg.com and referenced it in the internal doc.

@fabian-lunarg fabian-lunarg added the bug Something isn't working label May 25, 2026
Add dump-resources overrides for query-related Vulkan commands so generated replay code passes tracked object info into the dumper. The overrides replay query commands for dispatch/trace-rays dump contexts and avoid ending queries that were never begun, which fixes crashes during resource dumping.
Restore draw-call command-buffer forwarding in the query-related dump-resources overrides so they preserve the behavior that generated forwarding had before the commands moved to manual overrides.

Add the missing vkCmdCopyQueryPoolResultsToMemoryKHR override and regenerate the affected replay dump files.
Forward vkCmdBeginQuery and vkCmdEndQuery through both draw-call and dispatch/trace-rays dump command buffers, matching the indexed query overrides.

Also avoid shared_ptr ref-count churn in the forwarding helpers by iterating contexts by const reference.
@fabian-lunarg
fabian-lunarg enabled auto-merge June 16, 2026 10:36
@fabian-lunarg
fabian-lunarg added this pull request to the merge queue Jun 16, 2026
Merged via the queue into LunarG:dev with commit 38a6aed Jun 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-to-run-ci Can run CI check on internal LunarG machines bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants