fix(agc): name the shader and V# when a draw is refused for a buffer descriptor type #5897
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5897"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-14T15:03:29Z.
What
Stray (PPSA02101, #5894, and PPSA02100, #5879) stops in its opening cinematic on
The message names neither the shader nor the descriptor. Both reporters had to add a local print at the throw in
materializeTablesto get them, andAPS5_DUMP_SHADERSwrites nothing for this case: draws dump a request only when preparation fails (PrepareShaderWithDiagnostics), and this throw comes later, while the draw's resources are captured. Compute dispatches already putcompute shader 0x...and the dump path in front of the same errors.materializeTables: the error names the buffer slot and the four V# words, e.g.buffer descriptor uses an unsupported type (buffer 0 V# 20722c00 c3800000 001dc13f a1b00fac), like the image interface error does with its T#.Driver::materializeDrawStage: a failure in the stage's resource capture or materialization is rethrown asshader 0x<address> stage <n>: <reason>, the prefixPrepareShaderWithDiagnosticsuses. WithAPS5_DUMP_SHADERSset, the stage's request is dumped and its path goes in the prefix too.agc_driver_buffer_descriptor_runtimechecks that the refused vector read names buffer 0 and its words.agc_driver_draw_unsupported_buffer_type: a draw whose pixel shader loads through a V# with Stray's word 3 (0xa1b00fac, type 2) fails with the pixel shader's address and stage and the V# words.No behaviour changes: the same descriptors are refused as before, only the message is longer.
Title. I do not have Stray. With this PR the next report of #5894 or #5879 carries the shader address, the descriptor and, with
APS5_DUMP_SHADERS=1, a.reqdump without a local patch.Tested
Linux (Bazzite 44, GCC 16.2.1, Ninja, Release,
-DBUILD_TESTING=ON), RX 7700 XT (RADV), based onmain84b01f9cd:ctest: 1140 of 1162 pass and 20 are skipped (the display tests, no display in that shell).agc_driver_tessellationsegfaults on unchangedmainhere, andagc_host_import_sparsefails onmaintoo (#5759 fixes that test).agc_driver_draw_unsupported_buffer_typefails without theDrawCapture.cppchange (the message has noshader 0x... stage 5), andagc_driver_buffer_descriptor_runtimefails without theResourceMaterializer.cppchange (no(buffer 0 V# ...)).APS5_DUMP_SHADERS=1the new test still passes and writesshader_<address>.reqfor the pixel shader.tools/check_conventions.py --base upstream/mainpasses, andtools/pr_overlap.pyreports no overlap. Windows and macOS were not built here.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-14T22:25:45Z.
@oneandonlydean rebased onto
mainb9d9ec605(head7af296130) after #6093. ItsstageCapture.capture = capturesat on the line this PR wraps intry; it now follows the wrappedMaterializecall, and the PR's changed lines are otherwise the same. #6093's stage data hits patch words into a cached result without materializing, so they don't reach this throw.Full build and
ctesthere: 1188 of 1212 pass and 21 are skipped (display tests).agc_driver_tessellation,application_heap_lazyandagc_host_import_sparsefail on unchangedmainhere too.agc_driver_draw_unsupported_buffer_type,agc_driver_buffer_descriptor_runtimeandagc_driver_draw_cache_reusepass.Since #5894 was closed as a duplicate: the Stray stop in #5879 throws from the capture call (
shaderMemory.Capture(invocation), which materializes), so the wrapper covers both calls, and a run with this PR names the shader there.