graphics: ignore the mip statistics counter id of sampled depth textures (Demon's Souls) #2005
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!2005
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2005/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?
@Nawid3333 on GitHub · 2026-10-30 21:43 UTC · original
Nawid3333:fix/des-depth-counter-id→main· +36 −1 · 2 files · 7 commits · closed without mergingDemon's Souls (PPSA01341) stops at
unsupported sampled depth image(theEXITatdescriptors.cpp:205on751fbd096). The captured descriptor hasfields[6] = 0x00000002.Cause.
IsSupportedDepthTextureEncodingincludes bits 0–7 offields[6]in its metadata control check. Those bits (T# bits 199:192) holdMipStatsCntId(), the bank of the LOD statistics counter (COUNTER_BANK_IDin AMD's gfx10 register header); it selects a statistics counter, not metadata, whether or notfields[5]bit 25 enables counting. Since upstream259186917accepted descriptors may enable that counting, so the id can also be live. Upstreamc1d1003d8accepts the pipe-aligned bit (19) alone, and #1297 masks bits 15–18;0x2still fails with either.Change. The mask is
0x00ffff00instead of0x00ffffff; I merged upstream main (751fbd096, withc1d1003d8and259186917) and kept its pipe-aligned handling, so compressed HTILE still requires bit 19 with bit 21. The test checks the captured descriptor, an HTILE descriptor and an MSAA descriptor with a counter id (including bit 7), a pipe-aligned descriptor with a counter id (fields[6] = 0x00080002), the same four with counting enabled (fields[5]bit 25), and that a DCC-only control with a counter id is still rejected, with and without counting.Tests.
7e4f8a6d3),--sampled-depth-resource-onlyon the RX 9070 XT:DepthTextureEncodingpasses. With the new test alone on main (751fbd096), it fails at the captured descriptor, at the HTILE/MSAA/pipe-aligned cases and at the counted cases.DepthAttachmentFeedbackthen fails the same way with and without this change; this host reports no depth attachment feedback loop support. Both 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); the game runs above used it. With it off (the default), the same lab build without this fix reached character creation without this stop in 2 of 2 runs, which fits TheCamrew reaching gameplay on4919fdb(#1660). With it on, the check rejects the descriptor for bits that do not control metadata (see Cause).Written with Claude Code and OpenAI Codex (AI): it found the cause, wrote the change and the test, and ran the tests and the game on my PC.
@coderabbitai[bot] on GitHub · 2026-10-30 21:46 UTC · original · edited 2026-11-08 00:09 UTC
No actionable comments were generated in the recent review.
Walkthrough
IsSupportedDepthTextureEncodingnow excludes bits 0–7 offields[6]from metadata-control validation. Tests cover depth, compressed, MSAA, pipe-aligned, and DCC-control descriptors with counter IDs, both with and without mip statistics enabled.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
7e4f8The descriptor change and its tests identify no actionable merge-blocking issue. Merge after normal checks.
Pre-merge checks:
4 ·
1
Full details: Title check
Explanation
The title names the change (ignoring the mip statistics counter id in the sampled depth texture check) and the affected title (Demon's Souls). It matches the one-line mask change from 0x00ffffff to 0x00ffff00 in descriptors.cpp and the added DepthTextureEncoding test cases. It is specific and clearly describes the primary change.
Full details: Description check
Explanation
The description states the failing game stop, the root cause (bits 0-7 of fields[6] hold MipStatsCntId() and are included in the metadata control check), the mask change, the retained pipe-aligned handling, the added test cases, and the test runs. It relates directly to the changeset.
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
e001ef98-6a86-4fa4-95e5-7f69c83fc926Reviewing files that changed from the base of the PR and between
616c009f93and7e4f8a6d3c.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; 7 remain after this review.
@Nawid3333 on GitHub · 2026-11-09 14:40 UTC · original
Superseded by
4fa10abbfin main, which ignores the same counter id bits, and2e152f699, which ignores the metadata settings of uncompressed sampled depth textures altogether. Closing this one.Pull request closed