feat(agc): skip draws whose graphics stage the recompiler refuses behind APS5_SKIP_REFUSED_DRAWS #8206

Merged
Celegans12 merged 1 commit from upstream-pr/8206 into main 2026-10-21 07:16:54 +00:00
Celegans12 commented 2026-10-20 03:05:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-20T03:05:27Z.


What

When the recompiler refuses a graphics stage while a draw builds it, the packet worker fails the queue and the next Submit or WaitIdle rethrows 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 while materializeDrawStage prepares, captures or recompiles a stage becomes a RefusedDraw. 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.
  • The trade: the frame lacks that draw instead of the process stopping, and the stage is refused again at each draw that uses it.
  • Unchanged: errors after the stages are built (pipelines, device), prechecked rejections, and compute refusals, since a skipped dispatch can drop results the title waits on.
  • An ENVIRONMENT.md row and a libSceAgcDriver debt 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

  • Windows 11 Pro, MinGW-w64 GCC 15.2.0, Release, -DBUILD_TESTING=ON, RTX 3080 Laptop: the new agc_driver_draw_unsupported_buffer_type_skip_refused submits a draw whose pixel shader is refused (V# type 2) twice with the switch; both times the WRITE_DATA after it lands, the color target stays untouched, and the skip is logged once. It fails on main (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 and agc_shader_* tests: 64/64 with ANYPS5_REQUIRE_VULKAN=1, and the two draw tests log no VUID- under VK_LAYER_KHRONOS_validation.
  • Linux (WSL, gcc 13.3, lavapipe), CI's job on the merge with main a020d025: 56/56 of those tests.
  • Not tested: a game run with this branch.

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 (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 610.62, Windows 11 Pro; lavapipe (Mesa 25.2.8, WSL Ubuntu 24.04)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4930408756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-20T03:05:27Z. --- ### What When the recompiler refuses a graphics stage while a draw builds it, the packet worker fails the queue and the next `Submit` or `WaitIdle` rethrows 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 while `materializeDrawStage` prepares, captures or recompiles a stage becomes a `RefusedDraw`. 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. - The trade: the frame lacks that draw instead of the process stopping, and the stage is refused again at each draw that uses it. - Unchanged: errors after the stages are built (pipelines, device), prechecked rejections, and compute refusals, since a skipped dispatch can drop results the title waits on. - An `ENVIRONMENT.md` row and a `libSceAgcDriver` debt 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 - Windows 11 Pro, MinGW-w64 GCC 15.2.0, Release, `-DBUILD_TESTING=ON`, RTX 3080 Laptop: the new `agc_driver_draw_unsupported_buffer_type_skip_refused` submits a draw whose pixel shader is refused (V# type 2) twice with the switch; both times the `WRITE_DATA` after it lands, the color target stays untouched, and the skip is logged once. It fails on `main` (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 and `agc_shader_*` tests: 64/64 with `ANYPS5_REQUIRE_VULKAN=1`, and the two draw tests log no `VUID-` under `VK_LAYER_KHRONOS_validation`. - Linux (WSL, gcc 13.3, lavapipe), CI's job on the merge with `main` a020d025: 56/56 of those tests. - Not tested: a game run with this branch. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 610.62, Windows 11 Pro; lavapipe (Mesa 25.2.8, WSL Ubuntu 24.04) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 03:12:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T03:12:00Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6926 docs/dev/debt/libSceAgcDriver.md L100
PR 8932 docs/dev/debt/libSceAgcDriver.md L100

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.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5115 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/ENVIRONMENT.md
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawUnsupportedBufferType.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Diagnostics.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Diagnostics.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7484 docs/dev/ENVIRONMENT.md
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7677 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7689 core/libs/prx/libSceAgcDriver/tests/execution/DrawUnsupportedBufferType.cpp
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7814 docs/dev/ENVIRONMENT.md
PR 7965 docs/dev/debt/libSceAgcDriver.md
PR 8014 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8077 docs/dev/ENVIRONMENT.md
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 8552 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8564 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8658 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282454945 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6282454945). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T03:12:00Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6926](https://www.github.com/boykopovar/AnyPS5/pull/6926) | `docs/dev/debt/libSceAgcDriver.md` [L100](https://github.com/boykopovar/AnyPS5/blob/b77bd58806a5d9a7ecc91ee7290728a4d2ff4d6d/docs/dev/debt/libSceAgcDriver.md#L100) | | | | [PR 8932](https://www.github.com/boykopovar/AnyPS5/pull/8932) | `docs/dev/debt/libSceAgcDriver.md` [L100](https://github.com/boykopovar/AnyPS5/blob/b77bd58806a5d9a7ecc91ee7290728a4d2ff4d6d/docs/dev/debt/libSceAgcDriver.md#L100) | | | 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. | Pull request | Shared files not compared | |---|---| | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5115](https://www.github.com/boykopovar/AnyPS5/pull/5115) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`docs/dev/ENVIRONMENT.md` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ENVIRONMENT.md` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/ENVIRONMENT.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawUnsupportedBufferType.cpp`<br>`docs/dev/ENVIRONMENT.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`docs/dev/ENVIRONMENT.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Diagnostics.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Diagnostics.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7449](https://www.github.com/boykopovar/AnyPS5/pull/7449) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/ENVIRONMENT.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ENVIRONMENT.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp`<br>`docs/dev/ENVIRONMENT.md`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7677](https://www.github.com/boykopovar/AnyPS5/pull/7677) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7689](https://www.github.com/boykopovar/AnyPS5/pull/7689) | `core/libs/prx/libSceAgcDriver/tests/execution/DrawUnsupportedBufferType.cpp` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7814](https://www.github.com/boykopovar/AnyPS5/pull/7814) | `docs/dev/ENVIRONMENT.md` | | [PR 7965](https://www.github.com/boykopovar/AnyPS5/pull/7965) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 8077](https://www.github.com/boykopovar/AnyPS5/pull/8077) | `docs/dev/ENVIRONMENT.md` | | [PR 8246](https://www.github.com/boykopovar/AnyPS5/pull/8246) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ENVIRONMENT.md` | | [PR 8484](https://www.github.com/boykopovar/AnyPS5/pull/8484) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ENVIRONMENT.md` | | [PR 8552](https://www.github.com/boykopovar/AnyPS5/pull/8552) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8564](https://www.github.com/boykopovar/AnyPS5/pull/8564) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 8592](https://www.github.com/boykopovar/AnyPS5/pull/8592) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 8658](https://www.github.com/boykopovar/AnyPS5/pull/8658) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
Dextroid17 commented 2026-10-20 16:06:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-20T16:06:01Z.


@Celegans12, thanks for opening #8206. I ran Yōtei on lavapipe with it this morning. Here is what it did.

Setup: llvmpipe (LLVM 23.1.1, 256 bits) from my own Mesa 26.2.4 build (its one local patch switched off), PPSA26344. Base is main at b106f6f8c (not the current tip) plus #8206 (b25874e0c, hand-applied because my base doesn't have the meshBarycentrics parameter yet). The run branch also carries 16 other unpushed local commits: my one-lane vertex work, the min/max RG32F carry, ShaderDiskCache assert bumps, memory probes, and shader-cache memory changes. APS5_SKIP_REFUSED_DRAWS=1, APS5_NO_PIPELINE_JOURNAL=1, 40-minute limit.

The switch fired once, at presented frame 690, about 27 minutes in:

[gpu] APS5_SKIP_REFUSED_DRAWS: skipping the draws that use shader 0x80003c5100: shader 0x80003c5100 stage 5: ShaderRecompiler::Recompile: SPIR-V emission failed: hash=0x549759766784 stage=2 opcode=Permlane16U32 reason=v_permlanex16_b32 from lanes 16-31 is outside the 8-lane host subgroup that runs this wave64 program at one lane per invocation

After it the game presented three more frames, up to 693, with no abort and no what().

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 PromoteMemToReg, and the main thread spinning at 100% at one app.elf address. My stack unwinding didn't get through libLLVM, so I can't yet say what is being compiled. One earlier run without the switch also stopped at frame 693 and stayed there for about 6 minutes, and two others hit the time limit at frames 695 and 699, just past the same point, so I'm looking into it separately.

One small thing: GitHub shows #8206 as conflicting with main.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6295349350 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6295349350). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-20T16:06:01Z. --- @Celegans12, thanks for opening #8206. I ran Yōtei on lavapipe with it this morning. Here is what it did. Setup: `llvmpipe (LLVM 23.1.1, 256 bits)` from my own Mesa 26.2.4 build (its one local patch switched off), PPSA26344. Base is `main` at b106f6f8c (not the current tip) plus #8206 (b25874e0c, hand-applied because my base doesn't have the `meshBarycentrics` parameter yet). The run branch also carries 16 other unpushed local commits: my one-lane vertex work, the min/max RG32F carry, ShaderDiskCache assert bumps, memory probes, and shader-cache memory changes. `APS5_SKIP_REFUSED_DRAWS=1`, `APS5_NO_PIPELINE_JOURNAL=1`, 40-minute limit. The switch fired once, at presented frame 690, about 27 minutes in: ``` [gpu] APS5_SKIP_REFUSED_DRAWS: skipping the draws that use shader 0x80003c5100: shader 0x80003c5100 stage 5: ShaderRecompiler::Recompile: SPIR-V emission failed: hash=0x549759766784 stage=2 opcode=Permlane16U32 reason=v_permlanex16_b32 from lanes 16-31 is outside the 8-lane host subgroup that runs this wave64 program at one lane per invocation ``` After it the game presented three more frames, up to 693, with no abort and no `what()`. 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 `PromoteMemToReg`, and the main thread spinning at 100% at one app.elf address. My stack unwinding didn't get through libLLVM, so I can't yet say what is being compiled. One earlier run without the switch also stopped at frame 693 and stayed there for about 6 minutes, and two others hit the time limit at frames 695 and 699, just past the same point, so I'm looking into it separately. One small thing: GitHub shows #8206 as conflicting with `main`. Written with AI assistance.
Celegans12 commented 2026-10-21 02:42:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T02:42:48Z.


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 v_permlanex16_b32 refusal on the 8-lane subgroup), and the game presented three more frames with no abort. I agree the stall at 693 doesn't look like #8206. A run without the switch stopped at the same frame for about six minutes, and the other two only got a few frames further. My guess from the PromoteMemToReg profile is that llvmpipe is compiling one very large shader there, but I haven't checked that.

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 APS5_SKIP_REFUSED_DRAWS line and the few lines after it? The conflict is fixed too: the branch is rebased onto current main (d4408699d).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6306689470 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6306689470). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T02:42:48Z. --- 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 `v_permlanex16_b32` refusal on the 8-lane subgroup), and the game presented three more frames with no abort. I agree the stall at 693 doesn't look like #8206. A run without the switch stopped at the same frame for about six minutes, and the other two only got a few frames further. My guess from the `PromoteMemToReg` profile is that llvmpipe is compiling one very large shader there, but I haven't checked that. 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 `APS5_SKIP_REFUSED_DRAWS` line and the few lines after it? The conflict is fixed too: the branch is rebased onto current main (d4408699d).
Dextroid17 commented 2026-10-21 03:12:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-21T03:12:45Z.


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 llvmpipe (LLVM 23.1.1, 256 bits), Mesa 26.2.4; tree = main b85d972f4 + #8206 b78c9a508 + #8747 + #8431; MESA_SPIRV_DUMP_PATH set) stalled at frame 707 the same way. The 0x80003c5100 deferral logged at t≈1861 s (frame 706). One worker thread was busy around t=1750–1840 s, slept again briefly, then ran at 100 % continuously from t≈1900 s until the process died with SIGSEGV at t≈3770 s, with 30 % of its samples in llvm::PromoteMemToReg.

I replayed the 20 compute shaders dumped in that window through a bare Vulkan harness (one compute pipeline, vkCmdDispatch(1,1,1), spec constants at default) on the same ICD. All 20 create a pipeline, in 0.01–34 s. I dispatched the 9 larger than 400 KB: the harness binds no images, so 7 of those segfault at first dispatch and tell me nothing; 1 returns in 4 s; and one never returns: 0xdcc0b0cc9d70618f600faa79c2b91ff3c9bdf972828f6e5eb6a7ee81994515a1.comp, 774 832 bytes, dumped at t≈1859 s. Its pipeline creates in 33 s, then the first dispatch was still running when a 900 s timeout killed it, one thread at 100 % in llvm::PromoteMemToReg (68 % self), in the same libLLVM.so.23.1 code region (0x4b8c5f0–0x4b8c700) the in-game thread sampled.

spirv-dis gives 3104 basic blocks, 1297 OpSelectionMerge, 33 loops and a 77-way OpSwitch. That fits the in-game stall (same function, same code region, the shader dumped ~40 s before the thread went continuously busy), and the harness has none of AnyPS5 in it, so the hang does not need #8206 to happen. Whether mem2reg is looping or merely super-linear I have not established (RSS was flat at 2.4 GB when I sampled it). I will take it to Mesa.

On the switch itself: APS5_SKIP_REFUSED_DRAWS was set in run 30, but 0x80003c5100 took the deferral path at pipeline creation, so the run never reached the skip path and says nothing about the switch either way. 0x80002e6d00 still has not appeared: 0 hits in runs 27, 28 and 30 (run 29 was a 600 s smoke run that stopped at frame 228). If it shows up, I will paste the skip line and what follows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307097698 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6307097698). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-21T03:12:45Z. --- 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 `llvmpipe (LLVM 23.1.1, 256 bits)`, Mesa 26.2.4; tree = main b85d972f4 + #8206 b78c9a508 + #8747 + #8431; `MESA_SPIRV_DUMP_PATH` set) stalled at frame 707 the same way. The 0x80003c5100 deferral logged at t≈1861 s (frame 706). One worker thread was busy around t=1750–1840 s, slept again briefly, then ran at 100 % continuously from t≈1900 s until the process died with SIGSEGV at t≈3770 s, with 30 % of its samples in `llvm::PromoteMemToReg`. I replayed the 20 compute shaders dumped in that window through a bare Vulkan harness (one compute pipeline, `vkCmdDispatch(1,1,1)`, spec constants at default) on the same ICD. All 20 create a pipeline, in 0.01–34 s. I dispatched the 9 larger than 400 KB: the harness binds no images, so 7 of those segfault at first dispatch and tell me nothing; 1 returns in 4 s; and one never returns: `0xdcc0b0cc9d70618f600faa79c2b91ff3c9bdf972828f6e5eb6a7ee81994515a1.comp`, 774 832 bytes, dumped at t≈1859 s. Its pipeline creates in 33 s, then the first dispatch was still running when a 900 s timeout killed it, one thread at 100 % in `llvm::PromoteMemToReg` (68 % self), in the same `libLLVM.so.23.1` code region (0x4b8c5f0–0x4b8c700) the in-game thread sampled. `spirv-dis` gives 3104 basic blocks, 1297 `OpSelectionMerge`, 33 loops and a 77-way `OpSwitch`. That fits the in-game stall (same function, same code region, the shader dumped ~40 s before the thread went continuously busy), and the harness has none of AnyPS5 in it, so the hang does not need #8206 to happen. Whether mem2reg is looping or merely super-linear I have not established (RSS was flat at 2.4 GB when I sampled it). I will take it to Mesa. On the switch itself: `APS5_SKIP_REFUSED_DRAWS` was set in run 30, but 0x80003c5100 took the deferral path at pipeline creation, so the run never reached the skip path and says nothing about the switch either way. 0x80002e6d00 still has not appeared: 0 hits in runs 27, 28 and 30 (run 29 was a 600 s smoke run that stopped at frame 228). If it shows up, I will paste the skip line and what follows.
Celegans12 commented 2026-10-21 06:18:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T06:18:28Z.


Thanks for chasing this down. A bare harness that hangs on that one 775 KB compute shader in llvm::PromoteMemToReg, with none of AnyPS5 in it, settles it: the stall at 693/707 is lavapipe's, not #8206's. Good luck with the Mesa report. And thanks for pointing out that 0x80003c5100 took the deferral path in run 30, so that run says nothing about the skip either way. If 0x80002e6d00 does show up, send me the skip line and I'll look at it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309471449 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6309471449). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T06:18:28Z. --- Thanks for chasing this down. A bare harness that hangs on that one 775 KB compute shader in `llvm::PromoteMemToReg`, with none of AnyPS5 in it, settles it: the stall at 693/707 is lavapipe's, not #8206's. Good luck with the Mesa report. And thanks for pointing out that 0x80003c5100 took the deferral path in run 30, so that run says nothing about the skip either way. If 0x80002e6d00 does show up, send me the skip line and I'll look at it.
oneandonlydean commented 2026-10-21 06:20:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:20:57Z.


@Celegans12 thanks, agreed on both. Full CI on d4408699d3 is next, with the skip test as the check on Linux.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309506063 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6309506063). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:20:57Z. --- @Celegans12 thanks, agreed on both. Full CI on `d4408699d3` is next, with the skip test as the check on Linux.
oneandonlydean commented 2026-10-21 06:45:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:45:23Z.


@Celegans12 thanks for the rebase onto current main. A quick check of 952ddb784 is next, then full CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309861647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8206#issuecomment-6309861647). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:45:23Z. --- @Celegans12 thanks for the rebase onto current `main`. A quick check of `952ddb784` is next, then full CI.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8206
No description provided.