Skip to content

fix(agc): name the shader and V# when a draw is refused for a buffer descriptor type - #5897

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
YossiYad:fix/name-unsupported-buffer-descriptor
Oct 14, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
YossiYad:fix/name-unsupported-buffer-descriptor

Conversation

@YossiYad

Copy link
Copy Markdown
Contributor

What

Stray (PPSA02101, #5894, and PPSA02100, #5879) stops in its opening cinematic on

[videoout] presentation failed: buffer descriptor uses an unsupported type

The message names neither the shader nor the descriptor. Both reporters had to add a local print at the throw in materializeTables to get them, and APS5_DUMP_SHADERS writes 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 put compute 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 as shader 0x<address> stage <n>: <reason>, the prefix PrepareShaderWithDiagnostics uses. With APS5_DUMP_SHADERS set, the stage's request is dumped and its path goes in the prefix too.
  • agc_driver_buffer_descriptor_runtime checks that the refused vector read names buffer 0 and its words.
  • New 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 .req dump without a local patch.

Tested

Linux (Bazzite 44, GCC 16.2.1, Ninja, Release, -DBUILD_TESTING=ON), RX 7700 XT (RADV), based on main 84b01f9cd:

  • Full build and ctest: 1140 of 1162 pass and 20 are skipped (the display tests, no display in that shell). agc_driver_tessellation segfaults on unchanged main here, and agc_host_import_sparse fails on main too (test(agc): drop a shared range's backing when the range goes away #5759 fixes that test).
  • agc_driver_draw_unsupported_buffer_type fails without the DrawCapture.cpp change (the message has no shader 0x... stage 5), and agc_driver_buffer_descriptor_runtime fails without the ResourceMaterializer.cpp change (no (buffer 0 V# ...)).
  • Under APS5_DUMP_SHADERS=1 the new test still passes and writes shader_<address>.req for the pixel shader.
  • tools/check_conventions.py --base upstream/main passes, and tools/pr_overlap.py reports no overlap. Windows and macOS were not built here.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (diagnostics for PPSA02101 and PPSA02100)
  • GPUs tested: AMD RX 7700 XT (RADV)
  • AI-assisted: yes

@YossiYad
YossiYad force-pushed the fix/name-unsupported-buffer-descriptor branch from 57d6e46 to 7af2961 Compare October 14, 2026 22:25
@YossiYad

Copy link
Copy Markdown
Contributor Author

@oneandonlydean rebased onto main b9d9ec605 (head 7af296130) after #6093. Its stageCapture.capture = capture sat on the line this PR wraps in try; it now follows the wrapped Materialize call, 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 ctest here: 1188 of 1212 pass and 21 are skipped (display tests). agc_driver_tessellation, application_heap_lazy and agc_host_import_sparse fail on unchanged main here too. agc_driver_draw_unsupported_buffer_type, agc_driver_buffer_descriptor_runtime and agc_driver_draw_cache_reuse pass.

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.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@oneandonlydean
oneandonlydean merged commit 90d148f into boykopovar:main Oct 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants