Repository navigation
fix(agc): dump a failing shader capture's own request - #6856
Conversation
|
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.
|
466f1ad to
bb24f2e
Compare
|
Rebased onto On Ubuntu 24.04 (GCC 13.3, Release, RTX 4070 Ti), AI-assisted: yes (Claude Code) |
|
I ran the new test binary directly (not through Setup: head
Cause: If you want to change it, a unique folder name works. Other tests already do this: Scope: Not checked: Windows, macOS, a real GPU, PS5 hardware, and a retail title. I did not review the capture and replay code itself. These runs only cover the test's working folder. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine. AI-assisted: yes |
|
Thanks @Dextroid17, that's right. 8eb3180 names the folder AI-assisted: yes (Claude Code) |
|
Thanks @milescoviello, AI-assisted: yes |
|
AMD on Windows run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release,
AI-assisted |
|
Thanks @LeandroLP23 for the AMD run on Windows. I added it to the description. AI-assisted: yes (Claude Code) |
With APS5_DUMP_SHADERS, a dispatch or draw stage that failed named shader_<address>.req, which is written once per address by the first call that captures the shader: a later call's failure pointed at an earlier call's user data and memory, and a failing capture's memory was never in the dump. A failure now writes shader_<address>_failed.req with the failing call's request and the memory its capture read, and names that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two copies of agc_driver_failed_capture_dump that ran at once shared temp_directory_path()/agc_failed_capture_dump, and one removed the folder while the other was writing its captures there. The folder name now carries a std::random_device value, as the pipeline journal test's does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rebased onto AI-assisted: yes (Claude Code) |
8eb3180 to
79874b9
Compare
|
Re-checked against current main: it merges cleanly, the |
What
With
APS5_DUMP_SHADERS=1, a dispatch or draw stage whose capture or recompile fails names a request file in its error. Crimson Desert, for example, stops withcompute shader 0x2154440100 (shader_2154440100.req): SrtWalker::EvaluateRuntimeSources failed to evaluate runtime sources: descriptor source 2 dword 0: ....That file is not the failing call's request.
shader_<address>.reqis written once per shader address, by the first dispatch or draw that captures the shader. So when a later call of the same shader fails, the file holds an earlier call's user data and memory. When the capture itself throws, the failing capture's memory was never part of the dumped request at all. Replaying Crimson Desert's file withagc_shader_replaygivesrecompiled: 116609 SPIR-V words, so the stop cannot be reproduced from it.A failure now writes
shader_<address>_failed.req, once per address, and names it in the error. It holds the failing call's request together with the memory its capture read (ShaderMemory::Regions(); for a draw stage that fails after its capture, the request's own memory). The dump of a successful capture is unchanged. Registration failures (PrepareShaderWithDiagnostics) are written asshader_<address>.prepare.reqsincemain's 1db31b9, and this PR leaves them alone. It uses that change's name suffix for its own dumps (_failed).Tested
Ubuntu 24.04, GCC 13.3, RTX 4070 Ti (NVIDIA 595.99).
agc_driver_failed_capture_dump: a compute shader loads its V# through a user-data pointer and stores through it. The first dispatch goes through a valid V#. The second goes through a pointer to a type 2 V# and fails withbuffer descriptor uses an unsupported type. The error must nameshader_<address>_failed.req; that file must hold the second dispatch's user data and replay to the same refusal, whileshader_<address>.reqholds the first dispatch's user data and replays cleanly. Withmain's four sources the test fails 3 of 3, for example withcompute shader 0x59360d7c4400 (shader_59360d7c4400.req): buffer descriptor uses an unsupported type (...). With the change it passes 3 of 3.^agc_driver_|^agc_vertex_barrier|recompiler|shader_cache|request_serializer|spirv|^agc_shader|bda|journal|preparedpass exceptagc_driver_graphics(Linux GCC13.3: agc_driver_graphics reports VOP2 for an all-zero vertex request #6792, fixed by test(agc): keep the vertex terminate case's code in static storage #6789) andagc_driver_store_over_untracked(test(agc): keep waiting for the neighbour copy case's result #6385), which fail onmaintoo.std::random_devicevalue to the folder name. With it, the test passes 3 of 3 alone and 12 of 12 in each of two rounds of 12 at once. @Dextroid17 reran their setup on 8eb3180 (Release, GCC 16.2.1, lavapipe): 72 of 72 pass, against 6 of 72 before (comment).@LeandroLP23 ran it on Windows 11 with an AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001) (comment), in one build of
main6efb726 with this PR and six other pull requests:agc_driver_failed_capture_dump,agc_driver_graphicsandagc_driver_store_over_untrackedpass 3 runs of 3.Not checked: macOS, Intel.
main0c25997 (79874b9), onto 1db31b9's suffix-baseddumpRequest. The 595 tests matching the regex above pass, exceptagc_driver_bda_device, which fails onmainhere too (fix(shader): leave the BDA lookup functions through one return #7571).VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -Vonmaine2a2914 and onmain+ this PR (79874b9, a local merge).main: 815 of 815 pass; with this PR: 816 of 816 pass. Neither log reports the layer missing. VUIDs onmain:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2; with this PR:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2. None is new with this PR.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)🤖 Generated with Claude Code