graphics: no DCC metadata for block-compressed textures (Demon's Souls) #2006
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!2006
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2006"
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?
@Nawid3333 on GitHub · 2026-10-30 21:44 UTC · original
Nawid3333:fix/des-bc-dcc→main· +60 −4 · 2 files · 7 commits · openDemon's Souls (PPSA01341) stops at
invalid color metadata(image.cpp:670on751fbd096) in character creation. The texture is a 128x128 BC3_SRGB image (Vulkan format 138).Cause. Its T# has
MetaCompressset (fields[6]bit 21, COMPRESSION_EN) andMetaAddr() << 8is0x00003f39c0003e00, which is not a guest address.ResolveTexturegives it DCC metadata at that address, andTextureCache::FindImageexits inImageOps::Validate(throughValidateImageDesc) because the range is not a validGuestRange.The RDNA2 ISA describes COMPRESSION_EN only as "enable delta color compression (DCC)" and does not say what it does for block-compressed formats. AMD's drivers do not set up DCC for these formats: Mesa leaves DCC off for block-compressed formats (ac_surface.c), and PAL's gfx10.3 format table lists BC1–BC7 as read-only textures with no color target (gfx10_3.yaml). In KytyPS5, render targets and video out cannot use BC formats, so nothing writes DCC data for a block-compressed image (
colorRenderTarget.cpp:170–173andgpu_format.cpp:91–104on751fbd096).Change.
MetaCompressonly counts when the format is not block-compressed (block_bytes == 0), for the metadata kind, the mip-view check and the metadata range. I merged upstream main (751fbd096).Tests.
shader_recompiler_compute_tests --compute-meta-clear-only: with the new test alone on main (751fbd096) it exits with the game'sinvalid color metadata; with this changeRenderExecutorColorMetadataClearandSampledDccClearpass. With only the mip-view argument put back toMetaCompress(), it exits at the BC1 case withunsupported texture mip view changes physical layout: base=1 last=1 max=0 extent=1024x1024x1 tile=5.RenderExecutorStencilBindingDiscovery, which runs after them, fails the same four checks on plain main; this host reports no depth attachment feedback loop support. These runs used #2038's harness change, because this GPU reports a robust storage buffer alignment of 4.shader_recompiler_compute_testsrun gives the same result with and without this change (186 cases ok, the same four failures, then this GPU's missing 2-sample support for format 129 stops the run).--redzone, the option GTA V needs, #829), which the game runs above used. With it off (the default), the same lab build without either fix reached character creation without a stop in 2 of 2 runs, which fits TheCamrew reaching gameplay on4919fdb(#1660).Written with Claude Code and OpenAI Codex (AI): it found the cause, wrote the change and the tests, and ran the tests and the game on my PC.
@coderabbitai[bot] on GitHub · 2026-10-30 21:48 UTC · original · edited 2026-11-09 14:55 UTC
No actionable comments were generated in the recent review.
Walkthrough
The texture resolver enables metadata compression only when the format has zero block-compressed bytes, the resource is not R128, and the descriptor enables metadata compression. A GPU-backed compute test checks resolved dimensions, metadata, mip levels, and texture views for block-compressed textures.
Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
bc958No actionable issue is identified for this change. It appears mergeable after normal checks.
Pre-merge checks:
4 ·
1
Full details: Title check
Explanation
The title names the main change: block-compressed textures no longer receive DCC metadata when MetaCompress is set. It also names the affected game. The title matches the raw summary, the objectives, and the description, which all describe the block_bytes == 0 gating of meta_compress in ResolveTexture.
Full details: Description check
Explanation
The description explains the cause of the Demon's Souls stop, the change to gate MetaCompress on block_bytes == 0, the supporting references, and the tests added and run. It directly describes the changeset in the descriptors.cpp and test files.
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 with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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
bb3d622f-d158-427e-b8e2-d24f4e9e0592Reviewing files that changed from the base of the PR and between
74df210d70andbc958dc6bd.src/graphics/host_gpu/renderer/pipeline/descriptors.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.