feat(agc): encode the DCC clear codes of A2R10G10B10 color targets #764
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/764"
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 Celegans12 on 2026-10-05T22:00:12Z.
What
LayoutFor(DccMetadata.cpp) has no case forVK_FORMAT_A2R10G10B10_UNORM_PACK32, whichDecodeColorFormatgives a COLOR_2_10_10_10 target with the alternate component swap, soFillDccClearcannot encode its 0001, 1110 and 1111 clear codes (0000 is filled before the layout lookup). Split out of #648 at the maintainer's request.clearTexel(the CB metadata pass in eliminate and decompress modes,storeClearTexels): returns the texel instead of throwing "the target's format has no encoding of its DCC clear code".DccAlphaOnMsb(it already defaulted to 4 channels; COLOR_2_10_10_10 accepts only swaps 0 and 1, so alpha stays on the high field); textures, which never resolve to A2R10G10B10; draws into resident targets, whose storage image reads the keys as guest format 50 (A2B10G10R10, throughFindGuestColorTargetFormat); the register clear color, copied from CB_COLOR_CLEAR_WORD; every other format.DisplayBufferClearPixelpresents these codes on blue-low 10-bit display buffers too, sinceDisplayTexelFormatgives them A2R10G10B10.metadataPassTestsintests/Graphics.cpp; the file merges cleanly.Tested
mainbc24783e: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)agc_driver_graphics(ctest), extended: a fast-clear eliminate pass over a DCC COLOR_2_10_10_10 target with the standard and the alternate swap writes 0x00000000, 0xc0000000, 0x3fffffff and 0xffffffff for 0000, 0001, 1110 and 1111 and sets every key to uncompressed, andFillDccClear, the call a draw into a copied target makes, gives the same words for the target; it fails onmainat the alternate-swap 0001 row ("the target's format has no encoding of its DCC clear code").Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)