fix(agc): accept a draw without a pixel program while CB_COLOR_CONTROL disables color #8078
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8078"
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 savvaniss on 2026-10-19T20:13:23Z.
What
A draw without a pixel program was refused with "a draw without a pixel program writes color" whenever
CB_TARGET_MASKandCB_SHADER_MASKoverlap on a target with a format. That happened even withCB_COLOR_CONTROLin mode 0 (CB_DISABLE).DecodeStatealready drops every color export in that mode (if (((read(cx, 0x202) >> 4u) & 7u) == 0u) exportCount = 0;), so such a draw writes no color.NullPixelProgramRejectionnow applies the same rule. An unwrittenCB_COLOR_CONTROLstill leaves the decision to the masks.A depth or stencil decompress pass draws this way. It disables color through
CB_COLOR_CONTROLand leaves the masks of the previous draw. Here is the draw that hit this, from a PS4 title through #6977's PS4 path:Its read and write bases are the same, so it is an in-place expand.
DecodeStatealready treats that as a draw without a depth target. Out-of-place expands are #6146's. That PR reads mode 0 the same way in its recognizer (((value(0x202) >> 4u) & 7u) != 0 && ... ColorWriteMask(cx) != 0), and it does not changeNullPixelProgramRejection, so the two do not overlap.agc_driver_graphicschecks the following on its draw without a pixel program and with the masks set:DecodeStatefinds no color target;CB_COLOR_CONTROLunwritten it is still refused.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release,
maine80325a4c. Intel UHD Graphics 770, driver 32.0.101.7088. AMD Radeon RX 9070 XT, driver 32.0.31041.1004.agc_driver_graphics: with only the test change, it fails onmainwitha draw without a pixel program was rejected while CB_COLOR_CONTROL disables color. It passes with the fix.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,ctest -R <tests> -V, onmainand on this branch, on both GPUs. The 15 tests are the graphics decode tests and the execution tests that draw without a pixel program or depth-only:agc_driver_graphics, the alpha-to-coverage tests,agc_driver_depth_fast_clear,agc_driver_depth_fast_clear_submit,agc_driver_depth_htile_write,agc_driver_native_depth_bda_clear,agc_driver_native_multisample_depth, theagc_driver_prepared_graphicstests andagc_driver_sample_mask_depth_stencil.mainVUID-VUID-VUID-VUID-Neither log has
was not found but was requested by env var VK_INSTANCE_LAYERS. The only messages in all four logs are the same threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists only pull requests that conflict withmain. Of those that touchState.cpp, only #6146 handles this draw shape, as above.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T20:24:32Z.
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.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppImported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T23:11:42Z.
NVIDIA and AMD iGPU run, plus Linux, of
1231265e5.Windows 11 Home 26300, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON,main9127ea36dwith this head merged. GPUs: RTX 5070 Ti (NVIDIA 617.42) and the AMD Radeon iGPU (RDNA2,1002:13c0, AMD proprietary driver 2026.04.17,ANYPS5_GPU=AMD).ANYPS5_REQUIRE_VULKAN=1,ctest -j4, failures rerun serially (there were none).agc_driver_graphics, the alpha-to-coverage, depth fast clear/HTILE write, prepared graphics and sample mask tests pass on both GPUs, as onmain.State.cppback tomain,agc_driver_graphicsfails witha draw without a pixel program was rejected while CB_COLOR_CONTROL disables color.CB_DISABLEin Mesamesa-25.2.0src/amd/registers/gfx10.json(CBMode:CB_DISABLE0,CB_NORMAL1), so the check matches the existingDecodeStaterule.main9127ea36dwith #8078, #8046, #8069, #8070, #7668, #8015 and #8026 merged together: 61 of the 62 related tests pass; the other,agc_driver_depth_compare_copy, fails withthe guest block is not write-watchedafter WSL reportsasynchronous userfaultfd write protection failed, an environment limit.AI-assisted: yes (Claude Code); results above were run on this machine.