fix(agc): eliminate a fast clear over part of a CMASK color target #10414
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10414"
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 orezraey on 2026-10-23T22:44:29Z.
What
DEATHLOOP (PPSA01670 01.405) stops about two minutes in with
AGC graphics: CB metadata pass over part of a color target. It renders at a dynamic resolution inside a 3840x2160 target and then issues a fast-clear eliminate (CB_COLOR_CONTROLmode 2) over only the drawn area: a temporary trace of the refused pass showed a CMASK target without DCC keys, viewport and scissor 3688x2112,CB_COLOR_CONTROL0x00cc0020.For that mode
RunColorMetadataPasswrites the clear colour into the tiles CMASK marks as cleared and leaves the others alone. A cleared tile already stands for the clear colour, so eliminating every cleared tile of the target gives the same texels as eliminating only those inside the drawn area. The decode therefore stops requiring full coverage for a fast-clear eliminate of a target without DCC keys. DCC targets and the other modes (DCC decompress, FMASK decompress, resolve) keep the requirement. What still differs is recorded in a new debt entry: the uncovered tiles end expanded in CMASK where the hardware leaves them cleared, which only shows if a title reads those entries or changes the clear colour before eliminating the rest.With this change DEATHLOOP goes past that point to its animated logo and its brightness calibration screen.
#9694 rewrites the same
requireCoveredline (coverage only for targets with CMASK or DCC keys); the two compose, and whichever lands second keeps both conditions. #9694 alone does not unblock this title, as its target has CMASK.Tested
Windows 11, MinGW (winlibs), NVIDIA GeForce RTX 5070 Ti.
agc_driver_graphicschecks that a fast-clear eliminate over part of a CMASK target without DCC keys decodes, that another metadata pass over part of that target and any pass over part of a target with DCC keys still throw; it fails without the change and passes three runs in a row with it.agc_driver_graphics,agc_metadata_pass,agc_recorder_cmaskandagc_driver_cmask_fast_clearrun onmainand on this change withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: all pass on both, the layer loaded on both, and neither log has aVUID-error.d963d44326(main merged after #8999, keeping bothlibSceAgcDriver.mdentries): the four tests above pass three runs in a row on Windows with the same validation settings, the layer loaded and noVUID-error. On Linux (WSL2, GCC 16.2)agc_driver_graphicspasses three runs in a row; the other three cannot run there, since WSL has no Vulkan driver (vkCreateInstancereturns -9).6aeb8d6c3e(main merged after #9694, which skips the coverage check for targets without CMASK or DCC keys; this branch now requires coverage whentarget.dccAddress != 0, or whentarget.cmaskAddress != 0and the pass is notEliminateFastClear, and the eliminate case moved to a CMASK target incmaskTests): the four tests above pass three runs in a row on Windows with the same validation settings, nowas not found but was requestedline and noVUID-error; the new case fails with #9694's condition alone. On Linux (WSL2)agc_driver_graphicspasses three runs in a row; the other three cannot run there (no Vulkan driver).tools/check_conventions.pypasses.tools/pr_overlap.py: #8999, #9077, #9694 touched nearby lines; all three are merged and in this branch.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T23:08:24Z.
Review: COMMENTED
I checked the overlap with #9694 against both exact diffs. Both PRs replace the same
requireCovered(target)line, and the predicates need an explicit composition when the second change lands. To preserve both intended relaxations, coverage should be required whentarget.dccAddress != 0or whentarget.cmaskAddress != 0and the pass is notEliminateFastClear. That keeps DCC and other CMASK passes guarded, while allowing the CMASK-only fast-clear case here and the no-CMASK/no-DCC cases in #9694.Could you and the #9694 author coordinate that combined condition and record the chosen integration order (including
Depends onif one must land first)? Otherwise, resolving the same-line overlap by taking either replacement verbatim would drop the other PR's behavior. The branch is also 55 commits behind currentmain; please refresh before merge.The exact-head conventions check and
git diff --checkpassed locally. I did not run the Vulkan or title tests; the description reports same-machine validation-layer comparisons and the DEATHLOOP run.