fix(agc): import uniform initial multisample contents under a compressed CMASK #19904
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19904"
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 xXPBSXx on 2026-11-14T07:29:33Z.
What
A title run of PPSA12361 on
main7fe931bacdastops atinitial multisample color contents with CMASK require a modeled metadata import(MultisampleTarget.cpp, inPrepareMultisampleTargetForDraw); three runs did (one plain, two with a read-only diagnostic added). The target that triggers it has two samples, 8 bytes per element, 512x512, no DCC and no fast clear, but a CMASK, which here only holds the compression of the fragment mask (FMASK). The diagnostic showed the color memory of that target all zero (4194304 bytes) in both runs, the FMASK not uniform in both, and the CMASK all zero in one run and mixed in the other.This imports the initial contents of such a target when all its fragments hold one texel, as that texel (the same import as without a CMASK), and still throws when the fragments differ. For uniform contents every FMASK value that names a stored fragment reads the same texel, so the CMASK does not change the result; what the console reads where an FMASK value names no stored fragment is not known, and
docs/dev/debt/libSceAgcDriver.mdsays so. The test commit pins a two-sample RGBA16F fixture whose CMASK is all zero and one whose CMASK is mixed (the FMASK is not uniform in both), with colour memory of one texel: it is imported as that texel and the guest bytes and the CMASK are unchanged; a counter-test with one differing fragment is refused without an owner and without byte changes.On the same base,
7fe931bacdawith the change cherry-picked, two title runs (Windows, RTX 4080 SUPER) do not show the old message and both end at the next refusal,dithered or rounded alpha-to-coverage is unsupported (register 0x2dc = 0x0001aa01). So the title moves on to its next stop; it does not produce a working frame here. On the currentmain04263e4d8438two runs without the change did not reach this target at all (no stop; the reason was not examined), so the stop could not be reproduced there; two runs with the change on that base also end at the alpha-to-coverage refusal. Whether the same draw is meant and how far the title gets in content was not measured (no picture was looked at, no input was sent).Tested
Windows 10 Pro 10.0.19045,
ANYPS5_GPU=4080for the tests and the title runs (Selected GPU name=NVIDIA GeForce RTX 4080 SUPERin each log), relinker and all libraries built from the tree before each title run (411 libraries on7fe931bacda, 413 on04263e4d8438). The unit tests ran on the heads of this pull request, on baseupstream/main04263e4d8438, one run per arm, on 14 November 2026; after the full build of the last head (ninjareturning 0) the five tests passed once more.agc_driver_sample_multisample_target_testsinitial-contents tests (5)agc_driver_native_color_initial_uniform_cmaskfails withinitial multisample color contents with CMASK require a modeled metadata import, the counter-test..._cmask_refusalpassesThe validation layer was inserted into each test process (
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, 5 of 5 processes per log) for the same pair on two GPUs, with the heads before this branch's last rewrite, which differ from the heads of this pull request only by one comment line removed from the test file (git diff --stat: one line inSampleMultisampleTarget.cpp; the fix and the debt entry are unchanged): RTX 4080 SUPER (driver 32.0.16.1074) and Radeon RX 6400 (driver 32.0.21033.3005), driver versions as reported by Windows. The test commit alone gives 4 of 5 and the fix 5 of 5 on both; no log line containsVUID(0 lines in each of the four logs). The GPU was shared with a running title (about 87 % load), and this says nothing about other tests or other draws.tools/check_conventions.py --base upstream/mainpasses with no error and no warning (the changed entry is 998 characters, up from 673). Not tested: Linux, macOS, the CI runner, a console (the entry stays unmeasured there), other titles, a title run on the currentmainthat reaches this target, and the frame the title would draw after its next stop.After this branch was merged with
mainf3c2cd73ab0d(merge commitb7bbef52c42c; one conflict inMultisampleTarget.cpp, resolved without a change of logic; the diff to thatmainis still the same four files, +71/-2), the same target was built on Windows 10 Pro 10.0.19045 and the registered tests of that filter ran with the validation layer inserted (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, oneInsert instance layerline per test process) on one GPU, NVIDIA GeForce RTX 4080 SUPER (driver 32.0.16.1074, as reported by Windows), one run per arm, same machine and order. The merge head passes 49 of 49 (49 processes with the layer) andmainf3c2cd73ab0dpasses 47 of 47 (47 processes); the two additional tests areagc_driver_native_color_initial_uniform_cmaskandagc_driver_native_color_initial_uniform_cmask_refusal. No log line containsVUID-orSYNC-HAZARD, and none says the layer was not found. The two-GPU statement above stays a measurement of the earlier heads; the second GPU was not run on the merge head, and the red/green pair was not repeated on it.Overlap: counted on 2026-12-04 from the 2148 open pull requests (file lists from the GitHub API, the pull requests with 100 or more files read in full through the files API; the 1262 pull requests that change
MultisampleTarget.cpp,SampleMultisampleTarget.cpp,agc_driver_sample_multisample_target_tests.cmake,docs/dev/debt/libSceAgcDriver.mdor the fragment, a file underdocs/dev/debt/, or have msaa, multisample or cmask in the title or branch name, had their patches of the files underdocs/dev/debt/and of the files with libSceAgcDriver or Multisample in the path searched forPrepareMultisampleTargetForDraw,DecodeCompressedCmaskTarget,modeled metadata import,initial multisample colorand the fragment name, from 00:08 to 01:20 UTC,mainat64fc0b14107cat the start). No other pull request changes the fragmentdocs/dev/debt/changes/fix-agc-msaa-cmask-uniform-initial.md, and no patch of a debt file contains a searched name. 71 other open pull requests change one of the four files; the merge of this merge headb7bbef52c42cwith each of them was made withgit merge-tree: 31 are clean; the other 40 conflict, and 39 of them already conflict withmainalone in as many files, so not because of this change. One conflicts because of this change: #21155 (fix(agc): settle DCC colour pages in imported resident runs), which merges cleanly withmainand conflicts with this head inagc_driver_sample_multisample_target_tests.cmake: both add modes to theforeach(initialMode IN ITEMS uniform uniform_refusals uniform_hook ...)line, and whichever is merged second keeps both lists (#21155 names this change as its mechanical conflict). Two other pull requests use the function: #6743 (perf(agc): defer pipeline artifacts with first-use preparation, which declares and definesPrepareMultisampleTargetForDraw_nid_no_patchinMultisampleTarget.hppand.cpp) merges cleanly with this head, and #23252 (feat(agc): resolve packed 11_11_10 float multisample targets, a call inSampleMultisampleTarget.cpp) already conflicts withmainalone in as many files. #17956 and #20579, named in the earlier text of this section, are merged. The count was repeated for the pull requests that were updated since 00:07 UTC (2125 open at 01:22 UTC, scanned from 01:22 to 01:31 UTC): 6 share a file, no name hit; 4 merge cleanly with this head and 2 already conflict withmainalone in as many files. 135 commits have been merged tomainsincef3c2cd73ab0d, themainof the merge; one of them,c48c201900d(#27849,perf(agc): replay draws to native multisample color targets), changedMultisampleTarget.cpp(24 lines added, 5 removed) and none changed the other three files; a merge of this head intomainatd9a511f9323cwas checked at 01:32 UTC and is clean, andtools/debt_fold.py --checkon that merge exits with 0 andtools/check_conventions.py --base upstream/mainwith the title and this description reports "All conventions checks passed". This pull request does not depend on any of them (Depends on: none).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)VUIDline on the heads before the merge withmain; on the merge headb7bbef52c42conly the RTX 4080 SUPER ran, also with noVUIDlineSummary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T03:42:14Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
1cd3db531ed042f1ddff0ab2f729f408c751bc41using the pinnedrepo_read.pyreader. I did not run commands or tests.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests were run independently. I reviewed all files listed in the manifest;
files.jsonwas not available through the reader. The code paths and behavior outside the read ranges were not verified. The author reports passing tests and title runs, but those results were not independently confirmed.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T09:48:37Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
9ca192874ab1da9a2f1c03739eca7c488f77f2edusing the prepared diff and pinned repository reader (repo_read.py). No tests or build commands were run during this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No independent test or build run was performed. Reviewed files:
MultisampleTarget.cpp,agc_driver_sample_multisample_target_tests.cmake,SampleMultisampleTarget.cpp, andfix-agc-msaa-cmask-uniform-initial.md. No changed files were excluded inmanifest.json.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T11:41:15Z.
Review: APPROVED
Reviewed — looks good
The changed lines and their surrounding code support the uniform-color import behavior; I found no verified defect, but did not run the tests or verify this behavior on a console.
What I ran
Reviewed head
24d60066481a1b3c7ba04c517afd0ad59103aebcusing the prepared diff and pinned repository reader. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the build or tests, verify the author-reported GPU results, or confirm console behavior. All four changed files listed in
manifest.jsonwere included and their changed lines were read; no changed files were excluded.To get this to a good state
Nothing is required. The console behavior noted in the debt entry remains unverified.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T14:03:33Z.
Review: APPROVED
I read the diff at
24d6006648. Windows 11, GCC 15.2, merged intomainat6c6b29320fetogether with other open PRs (so not an isolated build), withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1andVK_LAYER_KHRONOS_validationon an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).agc_driver_native_color_initial_uniform_cmaskand the sampled multisample target tests: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.agc_driver_native_color_initial_uniform_cmaskfails with "initial multisample color contents with CMASK require a modeled metadata import".Not checked: a title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:29:12Z.
Review: COMMENTED
The trial merge onto
c1601e56d5conflicts inMultisampleTarget.cpp. The new path permits initial contents under CMASK only after proving the stored fragments uniform. Keep the fixture’s differing-fragment refusal and its assertions that guest bytes and resident ownership remain intact after refusal. Those checks guard the fallback separately from uniform import. The unresolved merge prevents a paired run on current main.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T01:56:47Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
b7bbef52c42c4e12ce1aab72e5578693521263a. I inspected the prepared diff and all four changed files, including relevant implementation and test sections. I ran no tests or build checks. The author reports the merge-head test results below; I did not run them.Results
Findings
Blocking
None.
Non-blocking
Sources
Not verified
I did not run tests, inspect CI, or confirm behavior on console. The author reports Windows GPU tests and a 49-of-49 merge-head test run; these were not independently run in this review. All four changed files were listed as reviewed, with none excluded.
To get this to a good state
Nothing is required. Optional: verify console output for the described title case when practical.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T02:00:02Z.
Review: COMMENTED
Actionable comments
e8a4fb4d-1d12-4f53-b3a5-fa798b79b0f9Reviewing files that changed from the base of the PR and between
24d6006648andb7bbef52c4.core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.