fix(agc): render CB_COLOR_CONTROL mode disable as a draw without color #1414
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1414"
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 TheAggie on 2026-10-08T03:08:30Z.
What
CB_COLOR_CONTROL.MODE0 (disable) turns off color writes. It was accepted only when no color target was written. With a written target the draw was skipped (only normal color rendering with copy ROP is supported (CB_COLOR_CONTROL 0x00000000, mode disable)), even though the hardware writes no color in that mode.DecodeState: when the mode is disable, no export counts as written, so the draw has no color attachment and renders like the existing attachment-free path (depth only, or the screen scissor extent).colorControlSupported: mode disable is accepted with anyROP3and other bits, which do not apply while color writes are off. The draw rejection check accepts the same.agc_driver_graphics(DisabledColorTests): a written color target withCB_COLOR_CONTROL0x0 and 0xcc0000 decodes without a color attachment and keeps the scissor extent. It fails without the change.Related to #1346, which drops
COLOR_INVALIDtargets from the write mask. That PR handles disabled formats, this one the disabled mode; both touch the same check.Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 5070 Ti.
agc_*andshader_*tests pass. They were run from the generatedCTestTestfile.cmakecommands, because antivirus blocksctest.exeon this machine.Not tested on AMD, Intel or Linux.
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 TheAggie on 2026-10-08T03:24:31Z.
Showcase before/after on the combined local branch: without this change the instanced scene's draws are skipped; with it (together with #1415) the scene renders.


Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:16:36Z.
Checked build + full ctest on current main + this PR (457/457,
agc_driver_graphicspasses), and the newDisabledColorTestscase fails without theState.cppchange. Mode 0 =CB_DISABLEmatches Mesa (V_028808_CB_DISABLE). The branch conflicted with main inState.cpp/tests/Graphics.cpp(#1419colorControl &= ~1u, COLOR_INVALID test block); rebased keeping both. Merging once CI is green on the rebased head.