feat(agc): encode packed R11G11B10 float DCC fast clears #4315
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4315"
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 JAB-dev on 2026-10-12T05:53:04Z.
Fast clears of a packed float color target (B10G11R11, guest format 36) are now encoded, so a texture or target that carries the four DCC clear codes keeps them instead of being read as stored.
What
LayoutForhad no DCC layout forVK_FORMAT_B10G11R11_UFLOAT_PACK32, soFillDccClearreturned false andtextureClearKeysdropped the keys. The format now has a layout of three float channels of 11, 11 and 10 bits (no alpha), andOne()returns the value 1.0 for 10- and 11-bit floats (0x1e0 and 0x3c0). The clear codes 0000, 0001, 1110 and 1111 fill the texels with zero (0000, 0001) or RGB one (1110, 1111), identical for either alpha placement because the format has no alpha.One()now throws for a float channel width other than 10, 11, 16 or 32 instead of falling back to the 32-bit value.Seen in PPSA21703 (Vampire Survivors). On current main its log shows, for a white fast clear of a packed float surface:
[gpu] texture 0x238120000 (format 36) has 1111 DCC keys at 0x23628d000; its texels are read as storedTested
Windows 11, WinLibs GCC 15.2.0 r7, Release.
packedFloatDccClearTestsintests/TextureFormat.cpp: every clear code and both alpha placements fill the texels with 0 or 0x781e03c0 (R in bits 0-10, G in 11-21, B in 22-31), andTextureClearKeyskeeps the 1111 keys of a format 36 texture. On main the test fails withAGC graphics: packed float fast clear was not encoded.b42ef24e0; Linux not tested.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T11:10:14Z.
Rebased onto main
77b9f7270cand force-pushed. The conflict intests/TextureFormat.cppwas main's newsingleDccKeysTests; both test functions now run. No code changes; the commit keeps your authorship. 0x3c0 and 0x1e0 are 1.0 as 11- and 10-bit floats, and radv'sgfx8_get_fast_clear_parametersgivesB10G11R11_UFLOAT_PACK32no alpha channel and clears it to 0.0/1.0 with 0000/1111, which matches.agc_driver_graphicsfails on main withpacked float fast clear was not encodedand passes here, as do the DCC tests and theagc_/guest_ctest set (Linux). Merging.