renderer: decode R32_SFLOAT packed colour clears #436
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!436
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/436/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?
@CheesyPoofs346 on GitHub · 2026-08-31 22:45 UTC · original
CheesyPoofs346:fix/r32-sfloat-packed-clear→main· +4 −0 · 1 files · 2 commits · merged 2026-08-31 23:37 UTCSummary
R32_SFLOATpacked colour clears instead of rejecting them.R32UintandR32Sintwere handled; the float case fell through todefault: return false, so the clear was discarded.Problem
DecodePackedColorClearcoversR32Uint,R32Sintand the 8/10-bit UNORM/SRGB formats, but has no case foreR32Sfloat:Returning false makes
ResolveDccClearInfoclearmetadata_clear_supportedand discard the clear value:So a single-channel float target that the guest asked to clear keeps whatever was in that memory.
Observed in Grand Theft Auto V (PPSA04264) as red static covering window surfaces. With the clear decoded the same surfaces render their intended contents.
The encoding is the same one
DecodePackedDepthClearalready uses immediately below — the packed word is the float's bit pattern. Non-finite patterns are rejected rather than materialized, matching the guard the depth decoder applies.Scope
Only the decoding is added.
R32_SFLOATis deliberately not added tometadata_fixed_clear_supportedincolorRenderTarget.cpp: that path applies a fixed opaque-black clear, and enabling it for this format turned character surfaces white in testing.Validation
AI assistance
AI assistance was used for this change.
@copilot-pull-request-reviewer[bot] on GitHub · 2026-08-31 22:45 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.