graphics: honour PS5 register DCC clears on 16-bit colour targets #1234
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!1234
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1234/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?
@TheCruZ on GitHub · 2026-10-08 19:31 UTC · original
pr/dcc-clear-key-0x10→main· +6 −1 · 2 files · 1 commits · closed without mergingSummary
Fixes black smoke and particles in Grand Theft Auto V (PPSA04263): Michael's exhaled cigar smoke in the Father/Son cutscene (and small particles over the sky) rendered as opaque black blobs with ragged edges instead of translucent smoke.
Problem
The particle pixel shader also writes its view depth to an
R16_FLOATMRT blended withMIN. GTA V clears that target to 65504 (CB_COLOR_CLEAR_WORD0 = 0x7bff7bff) with a DCC fast clear whose metadata keys are0x10.DecodeColorClearonly treated the GFX100x20key as a clear-to-register, so the clear was dropped and the target kept the zeros in guest memory.MIN(0, depth)stays 0, and the depth-of-field pass then treats the smoke as touching the camera and blends in its dark near-field blur.Change
DCC keys
0x10are treated as clear-to-register like0x20, so the target is cleared to theCB_COLOR_CLEAR_WORDvalue (the 16-bit clear words already decode since57c97ebd).Testing
shader_recompiler_compute_tests:RenderExecutorColorMetadataCleargets a case that fills the metadata of anR16_FLOATtarget with0x10keys and clear word0x7bff7bff(fails without this change, passes with it).--image-overlap-onlyand the default run pass.AI usage
AI (Claude Opus 5.5) was used to investigate the issue and to implement the change. I reviewed the code, understand it, tested it as described above, and wrote this description myself, in general fully tested the game while doing few missions and playing in-game with my GTA V fork, i will be bringing PRs here after test them enough.
@coderabbitai[bot] on GitHub · 2026-10-08 19:35 UTC · original · edited 2026-10-08 19:46 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
9c6a548e-bb4a-472d-a6ac-91a5815da967📥 Commits
Reviewing files that changed from the base of the PR and between
2f4b8a335dandd8616fd788.📒 Files selected for processing (2)
src/graphics/host_gpu/renderer/cache/textureCache.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.
📝 Walkthrough
Walkthrough
DecodeColorClearnow accepts DCC clear codes0x10and0x20for non-CMASK metadata. For CMASK metadata, only code0selects the register-clear path. A test case covers a 16-bit layout with fill value0x10101010and expected texel and clear word0x7bff7bff.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
d8616The change enables the reported 16-bit DCC clear path, and the added R16 test verifies the resulting clear value. The author reports the test runs pass; no actionable merge blocker is evident.
🚥 Pre-merge checks | ✅ 4 | ❓ 1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed