fix(agc): import exact sRGB multisampled DCC clears #11704
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11704"
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 JJenkx on 2026-10-27T04:15:27Z.
What
A uniform DCC fast clear of a multisampled sRGB attachment reaches
ClearColorForTexel, which has no sRGB layout, and throws even for all-zero texels. Bendy PPSA27624 hits this on an 8-sampleR8G8B8A8_SRGBtarget.For a repeated 32-bit pattern, let the existing
MultisampledFillClearColorconversion handle the exact clear when the ordinary texel conversion cannot. That helper accepts only RGB endpoints 0/1 for sRGB; unsupported values retain the original refusal. Non-repeated and non-sRGB patterns retain their existing conversion. No metadata key interpretation or shader semantics change.The regression checks returned clear components and actual initial GPU imports/resolves for RGBA/BGRA sRGB, keys00/40/80/c0, both alpha placements and 2/4/8 samples. Source bytes start as a non-clear sentinel; a zero-sample-mask draw leaves all samples undrawn, then every resolved texel must match the encoded DCC endpoint. Existing RGBA16F DCC tests remain controls.
Tested
Independent Linux validation by jotitadev, main
a8bc4474cversus headbde84e528merged onto it: RTX3070 / driver595.99.02 reproduces the four expected failures before the production fix and passes7/7 afterward; lavapipe / Mesa26.0.3 reproduces the supported failures and passes5 with the two unsupported2x cases skipped. All four runs report zero VUIDs. The wider AGC suite reports1045/1045 on RTX3070; lavapipe1044/1045 has the sameagc_driver_multisample_retirementfailure as main (#9455). These are the contributor's results, separate from the AMD runs below.Arch Linux; AMD Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.4-1. Main
b986c11a344plus only the final regressions (f55badfb9659): the state and all three sRGB GPU groups fail at the same exact-clear guard; existing 2x/4x/8x DCC controls pass (3/7). The final candidatebde84e5289a6passes 7/7. Both arms use required Vulkan, disabled shader caches and actual Khronos validation: six layer insertions, zero VUIDs, no missing layers or skipped tests.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branch codex/msaa-dcc-srgb-clear-20261027found no direct overlap; shared-file changes in unmergeable older PRs were reviewed for a duplicate conversion. #8123 handles register clear key 20, and #11691 changes multisample sampling-format matching; neither implements this conversion.Native Bendy PPSA27624 v01.000.003, same verified standing-room checkpoint and 900ms movement/camera input: the prior diagnostic integration
a0b5021bad0stops on 8xR8G8B8A8_SRGB, key00, all-zero pattern. With the change (283feacdd95), the camera turn works and the room renders from the new viewpoint; ordinary close at 270s gives native exit0 (273.44s including cleanup). Both native arms have active Khronos, zero VUIDs and complete save/config/kernel restoration with no remaining processes. The native comparison uses frozen mainabed0354680plus #11690/#11692/#6782/#6913; the final seven-group comparison above uses latest fetched mainb986c11a344. The native candidate also passes 15 focused GPU groups before launch. This is initial-room control evidence, not a full-game pass.Paired latest-main logs, source pins, patch and native camera screenshot, SHA256
bbacd056a7130f7c1625e3c2c64dc2dddc2224b1587010c49dfcf5e97f3e20c9. Raw game memory, shaders, requests and saves are excluded.Windows and other GPU vendors not tested locally; no FPS claim.
The complete tested native composition patch applies to
abed03546804575703dbedcdd3c65efc6bf5d0f2and preserves the disclosed prerequisite changes; SHA256852b3a16f091237710e5bb68ae43e752413b01397f3bb47ed0b86e80e6e74f9a. It is reproduction evidence, separate from this standalone two-line production fix.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-27T05:12:37Z.
Review: APPROVED
Reviewed exact head
bde84e5289a6403ea6c47b0bd763c687392414bf.The fallback is narrowly gated: it runs only after the existing exact texel clear path fails, only for repeated four-word 32-bit fills, and the sRGB conversion accepts exact RGB endpoints. Other formats and values retain the existing failure path. I checked the new cases against the existing DCC clear semantics and inspected the GPU test setup and teardown; the added coverage spans RGBA/BGRA sRGB layouts, endpoint keys, alpha positions, and 2/4/8 samples.
I built
agc_driver_graphics_testsand ranagc_driver_msaa_dcc_state: 1/1 passed. This host lacks the Zen 2 CPU features required by the normal startup guard, so I temporarily bypassed that guard in the disposable review checkout to execute the CPU-only state test, then restored it and verified the checkout is clean. This result does not validate GPU execution. The PR description reports RX 6650 XT / Mesa RADV before-and-after GPU measurements and title-scene validation; I have not independently reproduced those GPU runs.The required intake, eligibility, conventions, label, and report checks are green. Hosted product jobs were skipped by the repository's path policy. No blocking issue found in the reviewed diff.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T06:03:45Z.
Review: COMMENTED
NVIDIA and lavapipe on Linux, red to green on both. Ubuntu 26.04, GCC 15.2, Release,
maina8bc4474c; headbde84e528merged onto it (clean). RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host, one at a time withVK_ICD_FILENAMES. Same command as the description,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,-j1.main+ this PR's test and CMake changes onlymsaa_dcc_stateandmsaa_dcc_srgb_clear_{2,4,8}fail withmultisampled DCC fast clear has no exact host value;msaa_dcc_clear_{2,4,8}pass (3/7)clear_4/clear_8pass,clear_2skippedsrgb_clear_2andclear_2skipped (lavapipe has no 2x color attachments)0
VUID-in all four runs.Suite (
ctest -R ^agc -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64" -j1 --timeout 30) with the head: RTX 3070 1045/1045; lavapipe 1044/1045, the one failure isagc_driver_multisample_retirement, which fails the same way onmainon lavapipe (#9455).GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux), lavapipe (Mesa 26.0.3).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.