Repository navigation
feat(libSceAgcDriver): skip CMASK decode on single-sample views with viewMip > 0 - #4965
Conversation
|
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built on main
Not tested: no game run. The batch was built once, not per PR; nothing failed, so no bisect was needed. AI-assisted (Claude Code). |
55a70d0 to
a2143e8
Compare
|
Rebased cleanly onto latest origin/main resolving the libSceAgcDriver.md merge conflict with newly merged #4041. Conventions checks pass locally with 0 findings and 0 errors, and Windows unit tests verified 10/10 clean by @xXPBSXx. This unblocks Teardown (PPSA08182 / Issue #3701). Register state confirmed on hardware: single-sample view with �iewMip = 1 where CMASK metadata only exists on base mip 0 (FAST_CLEAR skipped). @adriadam10 @oneandonlydean @MarcZX100 Clean, mergeable, and ready for review/merge when convenient. |
|
Evidence for the error this fixes: in three of my saved runs of PPSA15246 (2026-10-11, before this change) the title stops with AI-assisted (Claude Code). |
|
@xXPBSXx Thanks for confirming the saved run evidence on PPSA15246! That matches the exact CMASK fast clear assertion this PR resolves. |
a2143e8 to
acbc573
Compare
What
On AMD GFX10/GFX11 hardware, CMASK metadata only covers base mip level 0 (or MSAA samples). When a title sets up a mipmapped color target, CB_COLOR_INFO may retain
FAST_CLEAR(bit 13) while binding sub-resources (viewMip > 0), which drivers such as Mesaradeonsiexplicitly mask off (if (cb_psurf->level > 0) cb_surf.cb_color_info &= C_028C70_FAST_CLEAR;insi_state.c). In AnyPS5, bindingviewMip > 0withFAST_CLEARset causedDecodeColorBufferto fail withRequire(color.samples > 1 || (maxMip == 0 && !volume && slice == 0), "CMASK fast clears of a mipmapped, 3D or array color target are unsupported").This change skips single-sample CMASK fast-clear decoding when
viewMip > 0, leavingcmaskAddress = 0andcmaskFastClear = falseinstead of rejecting the draw.Tested
Added unit test in
core/libs/prx/libSceAgcDriver/tests/Graphics.cppverifying that a color buffer withFAST_CLEARset andviewMip == 1skips CMASK decoding withcmaskFastClear == falseandcmaskAddress == 0, whileviewMip == 0on a mipmapped target continues to reject unsupported fast clear. Verified documentation indocs/dev/debt/libSceAgcDriver.md.Checklist