graphics: honour DCC fixed clear codes on 16-bit and float colour targets #471
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!471
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/471/head"
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?
@brandostrong on GitHub · 2026-09-02 21:50 UTC · original
brandostrong:fix/dcc-fixed-clear-formats→main· +114 −0 · 2 files · 3 commits · merged 2026-09-03 01:41 UTCProblem. DCC fixed clear codes (0x00/0x40/0x80/0xC0, meaning 0/0/0/0, 0/0/0/1, 1/1/1/0, 1/1/1/1) were tracked for every target but only materialised on four 32-bit UNORM/SRGB formats. Astro Bot fast-clears a 960x540 RGBA16F fog layer with 0x40 every frame and composites it with
src + dst * src.a; with the clear never applied the layer's alpha stayed 0 and the whole scene was multiplied by zero. Title screen, menu and world were black behind the UI.Change. Extend the format list to the unsigned-normalised and float colour formats where "one" is 1.0 (R8/RG8/RGBA8/BGRA8/10-10-10-2/5-6-5/1-5-5-5/4-4-4-4 UNORM, R16/RG16/RGBA16 UNORM and SFLOAT, R32/RG32/RGBA32 SFLOAT, 11-11-10 UFLOAT). Integer and signed formats stay excluded. PAL defines these codes independent of bit depth (
gfx9MaskRam.cpp,Gfx9Dcc::GetFastClearCode, pre-gfx11 branch).Effect. Astro Bot's title screen, menu and game world render; a ghosting of stale menu text through the same layer is gone as well.
Verification. New case
RenderExecutorDccFixedClearFloat(0x40 and 0x80 on an RGBA16F DCC target); suites pass; confirmed in-game with a metadata trace showing the 0x40 fill accepted each frame.References
src/core/hw/gfxip/gfx9/gfx9MaskRam.cpp,Gfx9Dcc::GetFastClearCode(pre-GFX11 branch): clear codes 0x00/0x40/0x80/0xC0 (ClearColor0000/0001/1110/1111) apply to any format with sign-independent DCC encoding, with no bit-depth condition.