Repository navigation
feat(agc): skip draws whose graphics stage the recompiler refuses behind APS5_SKIP_REFUSED_DRAWS - #8206
Conversation
|
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.
|
|
@Celegans12, thanks for opening #8206. I ran Yōtei on lavapipe with it this morning. Here is what it did. Setup: The switch fired once, at presented frame 690, about 27 minutes in: After it the game presented three more frames, up to 693, with no abort and no 0x80002e6d00 was never requested in this run, or in my two earlier lavapipe runs with the switch set (both also reached frames 689-693). So the abort you wrote this for is still untested here. I'll send you the line if it comes up. The run stopped presenting at frame 693 and stayed there for about 13 minutes, until my time limit. I don't think that's #8206. A profile taken during the stall shows one thread at full CPU, mostly in LLVM's One small thing: GitHub shows #8206 as conflicting with Written with AI assistance. |
b25874e to
d440869
Compare
|
Thanks for running it on lavapipe and for the detailed log. From your log, the switch did what it should: it fired once, at frame 690, for 0x80003c5100 (the It's a pity 0x80002e6d00 hasn't come up yet, since that's the abort I wrote this for. If it shows up in a later run, could you paste the |
|
Thanks for the rebase; the runs below carry the earlier head (b78c9a508), which should not matter for what follows. Your guess checks out: it is one very large compute shader, and I can reproduce the hang outside the game. Run 30 (lavapipe I replayed the 20 compute shaders dumped in that window through a bare Vulkan harness (one compute pipeline,
On the switch itself: |
…ind APS5_SKIP_REFUSED_DRAWS When a draw's stage fails to prepare, capture or recompile, the packet worker fails the queue and the next Submit or WaitIdle rethrows the error, which ends the title. With APS5_SKIP_REFUSED_DRAWS set, materializeDrawStage rethrows that error as a RefusedDraw; the packet loop skips the draw, counts it as a thrown skip, logs the shader once per address and runs the rest of the submission. The frame then lacks that draw. Compute refusals and errors outside the stage build fail as before, and without the switch nothing changes. agc_driver_draw_unsupported_buffer_type_skip_refused submits a draw whose pixel shader is refused twice with the switch: the WRITE_DATA after it lands both times and the color target stays untouched. AI-assisted: yes
|
Thanks for chasing this down. A bare harness that hangs on that one 775 KB compute shader in |
|
@Celegans12 thanks, agreed on both. Full CI on |
d440869 to
952ddb7
Compare
|
@Celegans12 thanks for the rebase onto current |
What
When the recompiler refuses a graphics stage while a draw builds it, the packet worker fails the queue and the next
SubmitorWaitIdlerethrows the error, which ends the title. That's the right default. But on a host where some stages are refused it ends a bring-up run at the first one: on lavapipe's 8-lane subgroups Dextroid17's Yōtei runs abort at pixel shader 0x80002e6d00, and they asked for this switch in #675. So it's opt-in and off by default.APS5_SKIP_REFUSED_DRAWS(set = on): an error whilematerializeDrawStageprepares, captures or recompiles a stage becomes aRefusedDraw. The packet loop skips that draw, counts it as a thrown skip, runs the rest of the submission and logs[gpu] APS5_SKIP_REFUSED_DRAWS: skipping the draws that use shader 0x...: <first line of the error>once per shader.ENVIRONMENT.mdrow and alibSceAgcDriverdebt line describe it.Overlaps: #7682 keeps prepare-at-use failures, which would make the repeat cheap; independent. #7689 edits the same test file (small rebase for whichever lands second). #7201, #7332 (
Diagnostics.hpp/.cpp) and #7683 (ENVIRONMENT.md) add lines next to ours, textual only.Tested
-DBUILD_TESTING=ON, RTX 3080 Laptop: the newagc_driver_draw_unsupported_buffer_type_skip_refusedsubmits a draw whose pixel shader is refused (V# type 2) twice with the switch; both times theWRITE_DATAafter it lands, the color target stays untouched, and the skip is logged once. It fails onmain(the queue fails with the refusal).agc_driver_draw_unsupported_buffer_type(switch unset) still gets the named error. With the related prepared-shader, tessellation, graphics, pm4, draw cache, image table, buffer descriptor andagc_shader_*tests: 64/64 withANYPS5_REQUIRE_VULKAN=1, and the two draw tests log noVUID-underVK_LAYER_KHRONOS_validation.maina020d02: 56/56 of those tests.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)