fix(agc): run draws whose pixel stage cannot run without its program #1139
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1139"
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 alfalfa-star on 2026-10-07T13:36:19Z.
What
A draw whose pixel stage the hardware would not run no longer fails with
missing register at DWORD 0x1b3. Before, a draw went without a pixel program only when SPI_SHADER_PGM_LO/HI_PS were zero. A depth-only pass can instead leave a stale pixel program address from earlier state and never set the pixel registers it doesn't need (SPI_PS_INPUT_ENA/ADDR, SPI_SHADER_COL_FORMAT).The pixel shader has no effect and is not launched when all of these hold:
CB_TARGET_MASK & CB_SHADER_MASK == 0);Changes:
PixelProgramUnsetbecomesPixelProgramSkipped. It is true for a zero program address, as before, and also for such an inert pixel stage. A register the rule needs that is absent means "not skipped", which keeps today's behavior.DrawRejectionand the draw decode both use it, so a skipped stage takes the driver's null pixel program, as a zero address already did, and the precheck and the decode agree.Tested
Linux 7.2.9 (Arch), Mesa 26.2.4 RADV, RX 9070 XT.
agc_driver_graphics: a stale address with nothing written and nothing exported is skipped and passes the precheck. EXEC_ON_NOOP, KILL_ENABLE, a Z export, a Z format or a color write each keep the program, and the first two still need SPI_PS_INPUT_ENA. The existing zero-address and missing-register cases are unchanged.ctest: 396 of 396 pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T21:29:08Z.
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.
main)core/libs/prx/libSceAgcDriver/tests/Graphics.cppL222Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T08:20:07Z.
Checked build + ctest (424/424,
agc_driver_graphicspasses), CI green on the head. The new test cases pin skipped vs. kept for EXEC_ON_NOOP, KILL_ENABLE, Z export, Z format and color write, and unsupported DB_SHADER_CONTROL bits are still rejected (State.cpp:792). Merging.