graphics: support deferred DCC clears beyond 32 slices #543
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!543
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/543/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?
@MehmetCambaz on GitHub · 2026-09-09 12:32 UTC · original
MehmetCambaz:fix/dcc-clear-beyond-32-slices→main· +344 −37 · 4 files · 1 commits · closed without mergingProblem
MetaDataInfo::clear_masktracked pending DCC clear slices in auint32_t, so onlyslices 0-31 could be represented.
PrepareDccClearbailed out on any view whose slicerange fell outside that window, and
IsMetaCleared/TouchMetareported slice 32 andabove as not pending. A recognised guest DCC clear on a layered target with more than
32 slices was armed and then never materialised, leaving the image with its previous
contents.
Change
Track pending slices with the existing
RangeSetacross the slice range the guest canaddress. Widening the integer would only move the limit —
CB_COLOR_VIEWencodes 13-bitslice indices.
PrepareDccClearnow materialises the intersection of the bound view with the slicesstill pending, one contiguous run at a time. Partial consumption is unchanged: slices
already cleared are not cleared again, since they may have been rendered into since, and
a repeated metadata fill re-arms the whole range. The metadata entry is re-found after
each
ClearImage, because retiring an image can erase it.HTile still arms the same 32 slices as before; widening that belongs with a separate
multi-layer depth change.
Validation
New
texture_cache_dcc_slice_rangecovers a 64-slice target, a view starting above slice31, overlapping partial consumption, and a target past 64 slices so widening the mask
alone does not pass. The cases run through
ResolveRenderColorTarget/FindRenderTargetand check host texels and pending state before and after.
Focused DCC, HTile, depth and cache groups pass. Full CTest 37/38;
kernel_file_systemfails identically on pristine upstream.
Kena: Bridge of Spirits exposed this with a 64-slice RGBA16F volumetric lighting target
that is fast-cleared each frame before additive light injection. Before, the clear never
landed and radiance accumulated across frames into progressively over-bright blue/white
lighting. After, lighting stays stable.
AI assistance
AI assistance was used during investigation, implementation and testing. I reviewed the
resulting change and validation before submitting it.
@Nmzik on GitHub · 2026-09-15 08:58 UTC · original
@MehmetCambaz Could you please retest with main branch if the issue still persists?
@MehmetCambaz on GitHub · 2026-09-16 00:13 UTC · original
@Nmzik Retested on current main (
e6156bef). I couldn’t reproduce the original DCC/lighting issue in the run, although the low FPS and unrelated late-loading issues made the visual check a bit difficult.I also checked the current DCC path and this PR appears to have been superseded by
437e69ef(Remove extra DCC tracking). TrackDccFill, PrepareDccClear, and the pending DCC tracking this PR changes are gone, and MaterializeDccClear now works per slice against the actual layer count rather than the old 32-bit pending mask.So this PR is obsolete against current main and I’ll close it. Thanks for pointing me back to the latest code.
Also, while testing Kena I’ve been working on a couple of separate performance improvements: #562 reduces the PrepareBda overhead substantially in Kena, and #628 reduces SRT/resource-materialization CPU cost. If you get a chance, I’d appreciate a look at those as well.
@MehmetCambaz on GitHub · 2026-09-16 00:14 UTC · original
closing the pr
Pull request closed