graphics: honour DCC fixed clear codes on 16-bit and float colour targets #471

Manually merged
github merged 3 commits from gh-pr/471/head into gh-pr/471/base 2026-11-26 09:22:40 +00:00
Owner

@⁠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 UTC

Problem. 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

  • PAL (GPUOpen-Drivers/pal), 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.
**@⁠brandostrong** on GitHub · 2026-09-02 21:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/471) `brandostrong:fix/dcc-fixed-clear-formats` → `main` · +114 −0 · 2 files · 3 commits · merged 2026-09-03 01:41 UTC **Problem.** 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** - PAL (GPUOpen-Drivers/pal), `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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:22:38 +00:00
github manually merged commit 1fda805d4c into gh-pr/471/base 2026-11-26 09:22:40 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.