fix(agc): read the compressed FMASK of a resident two-sample color target #10233
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10233"
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 YossiYad on 2026-10-23T15:07:40Z.
What
Rush 2 Recompiled (PPSA69423) stops on
mainbefore its first frame:Its pixel shader reads the FMASK of a two-sample color target that has DCC and CMASK (
Fmask8_S2_F2, CMASK metadata in the T#). #7948 added this read for a tracked resident target, but only for eight samples and eight fragments. This PR takes the same path for two:Fmask8_S2_F2, as they do onFmask32_S8_F8. Without CMASK, #8429 already reads it from guest memory.0x02for two samples (Gfx9Fmask::GetPackedExpandedValue), as0x76543210is for eight. #8429's shader expansion turns it into0x10, four bits per sample, as Mesa reads it for every sample count (nir_lower_ms_txf_to_fragment_fetch). The view accepts the identity selectors that expansion reads with. Neither value is measured on a PS5; the debt entry says so.With this, Rush 2 reaches its launcher ("Locate ROM") and holds 60 FPS for 60 s with the shader cache off. Going further needs the player's own ROM.
Tested
Current validation (2026-10-25): rebased onto main
16ff208dc3. On AMD Radeon RX 7700 XT, RADV Mesa 26.2.4, Bazzite 44, the focused shader-memory, graphics and native-FMASK pattern passes on both main (3 tests) and this branch (4 tests, including two/eight samples). Both runs useANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandctest -V; noVUID-errors or missing-layer warnings in either log. No title rerun for this update.Linux (Fedora 44, GCC 16, Ninja,
-DBUILD_TESTING=ON), RX 7700 XT (RADV), based onmain3c44638fc6:agc_driver_native_fmask_2,agc_driver_native_fmask_8). The two-sample run draws a different color into each sample, then checks that each sample's FMASK index picks its own fragment, both XOR settings, both registration modes, cached and prepared dispatches, and invalid metadata/owner/extent checks. It also refuses an eight-sample FMASK format on a two-sample target.agc_shader_memoryandagc_driver_graphicscheck that a two-fragment FMASK is accepted with CMASK without pinning valid-but-unimplemented layouts to rejection.0x10instead of the stored0x02, the view refusing identity selectors, eight samples only, and refusing CMASK on two fragments in the compiler or the T# decoder.agc_driverandshadertests pass exceptagc_driver_tessellation,agc_driver_bda_reads_shadowed_resultsand its_per_buildvariant, which fail the same way onmainon this machine.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pyfinds no PR with the same change. The others share test, CMake or debt lines.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)