Repository navigation
fix(agc): name preparation-failure shader dumps apart from dispatch captures - #6134
Merged
adriadam10 merged 1 commit intoOct 18, 2026
Merged
Conversation
11 tasks done
11 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This was referenced Oct 15, 2026
Merged
11 tasks done
11 tasks done
11 tasks done
…aptures With APS5_DUMP_SHADERS set, PrepareShaderWithDiagnostics wrote a request whose preparation failed under the same shader_<address>.req name that dispatch and draw captures use. A preparation request has no captured resources: the registration-time one carries placeholder (zero) user data and only the code and header memory. Replaying such a file as a dispatch capture follows the null user-data pointer into the SRT and fails in SrtWalker, which looks like a walker bug but is not one. dumpRequest also de-duplicated by address, so once a preparation failure had been dumped, a later dispatch dump of the same shader was silently dropped and the real capture was lost. Preparation-failure dumps are now written as shader_<address>.prepare.req, and dumpRequest de-duplicates by file name, so the later dispatch dump of the same address is still written. agc_shader_replay's usage text says to replay .prepare.req files with --prepare. The FailureCapture test expects the .prepare.req name, no plain .req from a preparation failure, and a subsequent dispatch dump of the same address to be written with the serialized request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adriadam10
force-pushed
the
claude/agc-prepare-dump-name
branch
from
October 18, 2026 19:22
b886106 to
1db31b9
Compare
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
With
APS5_DUMP_SHADERSset, a shader whose preparation fails is dumped byPrepareShaderWithDiagnosticsunder the sameshader_<address>.reqname that dispatch and draw captures use. The two kinds of file need different replays:PrepareRegistered) also carries placeholder user data (all zero) and only the code and shader-header memory.agc_shader_replay, or--materializefrom feat(agc): replay prepared shader capture and materialization offline #5959) follows the zero user-data pointer into the SRT. The table-base read then misses the request memory andSrtWalker::EvaluateDescriptorSourcethrows, so the replay reports a walker failure that never happens in the game, where dispatch uses the real user data.--preparesucceeds on the same files.Driver::dumpRequestde-duplicated by address. Once a preparation failure had been dumped, a later dispatch or draw dump of the same shader was dropped, so the request that would have shown the real capture was never written.Changes:
Driver::dumpRequesttakes an optional file-name suffix.PrepareShaderWithDiagnosticspasses.prepare, so preparation failures are written asshader_<address>.prepare.req. Dispatch and draw dumps keep theirshader_<address>.reqname.agc_shader_replayusage text says that a.prepare.reqholds a request whose preparation failed before any resource capture, and that it should be replayed with--prepare.FailureCaptureintests/execution/PreparedShaders.cppexpects the.prepare.reqname and no plain.reqfrom a preparation failure. It then dumps a dispatch request for the same address and requiresshader_<address>.reqto be written with the serialized request.Known limit: a registration-time
.preparedump still suppresses a later at-use.preparedump of the same address, which would carry real user data. Both replay only with--prepare, so this PR leaves it as is.Tested
Windows Server 2025 (10.0.26100), NVIDIA GeForce RTX 3060 12 GB, driver 591.86, Vulkan 1.4.325. WinLibs MinGW-w64 GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON. Builtagc_driver_prepared_shaders_tests,libSceAgcDriverandagc_shader_replay. Based onmain6239cef.ctest -R '^agc_driver_prepared_shaders'(9 variants;FailureCaptureruns inagc_driver_prepared_shaders,_indirect,_uncachedand_debug):main's driver: those 4 variants fail with "enabled shader capture changed the diagnosed failure", because the failure namesshader_12345cafe.req. The other 5 pass.main80ccb9f and again after rebasing onto 6239cef.agc_shader_replaywith no arguments prints the new usage text.The bug was found while replaying a corpus of dumps from a title: every request that failed in
SrtWalkerwas a registration-time preparation dump with zero user data and only code and header memory, and each one passed with--prepare. Those dumps are not attached or included.Not tested: Linux, macOS, a title run with this change.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)--materializereplays dispatch captures; with this change a.prepare.reqcan be told apart and replayed with--prepareonly. feat(agc): replay prepared shader capture and materialization offline #5959 and perf(recompiler): select guest memory loads instead of branching around them #4048 change the sameagc_shader_replayusage line, so whichever lands second rebases that one line.🤖 Generated with Claude Code