fix(agc-driver): accept per-engine primitive discard in PA_SC_MODE_CNTL_1 #840

Merged
merwie merged 1 commit from upstream-pr/840 into main 2026-10-07 02:26:21 +00:00
merwie commented 2026-10-06 08:48:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-06T08:48:05Z.


What

The draw state check now accepts bit 17 of PA_SC_MODE_CNTL_1 (0x293, MULTI_SHADER_ENGINE_PRIM_DISCARD_ENABLE).

The bit lets each shader engine drop the primitives that fall outside its own part of the screen. It decides how work is split between engines and has no visible effect. Until now, any draw with it set was skipped:

[gpu] skipped draw: sample iteration, primitive discard or out-of-order rasterization is unsupported (register 0x293 = 0x06020000) [DRAW_INDEX_2, color target ...]

PPSA12544 (Hollow Knight: Silksong) sets 0x06020000: bit 17 plus the EOV bits 25 and 26, which were already accepted. It does so on the draws that produce its presented image, so every frame it presented was black. I checked 2,400 dumped frames and every one had maximum pixel value 0. With this change the Team Cherry logo, the save notice and the title menu render.

The other bits of the register (PS_ITER_SAMPLE, out-of-order rasterization, multi-GPU) are still rejected. The test checks that 0x06020000 is accepted and that adding bit 16 is still rejected.

Tested

  • Windows 11, Radeon RX 9070 XT, PPSA12544 from boot to the title menu (bring-up: #726). No skipped draw messages remain, and the dumped frames show the expected images.
  • agc_driver tests run serially: 143 of 145 pass. The two failures (agc_driver_lds_atomics64, agc_driver_vopc_compare_table) also fail on main on this host.
  • The other tests pass.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4756375871 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/840). Originally posted by [merwie](https://github.com/merwie) on 2026-10-06T08:48:05Z. --- ### What The draw state check now accepts bit 17 of `PA_SC_MODE_CNTL_1` (0x293, `MULTI_SHADER_ENGINE_PRIM_DISCARD_ENABLE`). The bit lets each shader engine drop the primitives that fall outside its own part of the screen. It decides how work is split between engines and has no visible effect. Until now, any draw with it set was skipped: ``` [gpu] skipped draw: sample iteration, primitive discard or out-of-order rasterization is unsupported (register 0x293 = 0x06020000) [DRAW_INDEX_2, color target ...] ``` PPSA12544 (Hollow Knight: Silksong) sets `0x06020000`: bit 17 plus the EOV bits 25 and 26, which were already accepted. It does so on the draws that produce its presented image, so every frame it presented was black. I checked 2,400 dumped frames and every one had maximum pixel value 0. With this change the Team Cherry logo, the save notice and the title menu render. The other bits of the register (`PS_ITER_SAMPLE`, out-of-order rasterization, multi-GPU) are still rejected. The test checks that `0x06020000` is accepted and that adding bit 16 is still rejected. ### Tested - Windows 11, Radeon RX 9070 XT, PPSA12544 from boot to the title menu (bring-up: #726). No `skipped draw` messages remain, and the dumped frames show the expected images. - `agc_driver` tests run serially: 143 of 145 pass. The two failures (`agc_driver_lds_atomics64`, `agc_driver_vopc_compare_table`) also fail on `main` on this host. - The other tests pass. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!840
No description provided.