graphics: accept pipe-aligned uncompressed depth textures (Guardians of the Galaxy, #1004) #1438
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!1438
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1438/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?
@overlordxrz-source on GitHub · 2026-10-12 03:48 UTC · original
overlordxrz-source:graphics/depth-pipe-aligned→main· +15 −1 · 2 files · 1 commits · closed without mergingStop: Marvel's Guardians of the Galaxy (PPSA01748) exits on the loading screen before the main menu, every launch (#1004, official
f53e5d2, and source build8cbee7fon an RX 7600):Main
5b730d4still has the same check (IsSupportedDepthTextureEncoding, now reached from descriptors.cpp:184 / EXIT at :193).Cause: only
encodingfails. The T# is a 1920x1080 D32 view (format 22, tile mode depth, 2D, R001 swizzle). DWORD 6 is0x00080000: META_PIPE_ALIGNED (bit 19) set, COMPRESSION_EN (bit 21) clear, metadata address 0.IsSupportedDepthTextureEncodingaccepts only a zero metadata control or the full HTILE control0x00280000(bits 19 and 21), so it rejects this plain depth view. @hackerinfo89 traced it to this check in #1004.META_PIPE_ALIGNED only chooses how a metadata surface is laid out. With COMPRESSION_EN clear the texture unit reads no HTILE. Mesa builds descriptors like this too: on GFX10 its FMASK descriptor always sets
META_PIPE_ALIGNED(1)and addsCOMPRESSION_ENonly for TC-compatible CMASK (ac_build_fmask_descriptor, src/amd/common/ac_descriptors.c).Change (descriptors.cpp, +4/-1): a metadata control with only META_PIPE_ALIGNED set is now treated like a zero one. As before, an inactive metadata address is ignored (same as the existing "disabled metadata with retained address" case). Any other bit still goes through the HTILE path and its address/tile checks.
Test:
CheckDepthTextureEncodingadds the descriptor from the #1004 log, which must be accepted. It also adds the same descriptor with ALPHA_IS_ON_MSB (bit 22) set, which must still be rejected.Checks:
-std=c++20 -Wall -Wextra: rc=0. The only warnings are the two-Wsign-compareones main already has in the same file (lines 939/940 on main).tests/ShaderRecompilerComputeTests.cpppasses-fsyntax-onlywith 0 errors.IsSupportedDepthTextureEncodingagainst the realCheckDepthTextureEncoding. With this change all 8 cases pass. On main the new case fails and the 7 existing ones pass.5b730d4and merges cleanly with #1187, #1241, #1256, #1388, #1389, #1421 and #1430. #1297 touches the next lines of the same function, so they conflict textually. Combining them is easy: mask #1297's DCC block-size bits, then apply this check. (#1297 already conflicts with main in four other files.)Not verified:
8cbee7fwas a loop-indexed image table in PS0xb86c8dfc3f2471af("GetImageResource dword 0 is not a valid runtime value"). Resource tracking has changed since then, so I don't know whether main still stops there. This PR only removes the first stop.Refs #1004.
AI-assisted: yes (investigation, code and description; I reviewed it. The diagnosis of the stop is hackerinfo89's from #1004).
@coderabbitai[bot] on GitHub · 2026-10-12 03:50 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
a866067d-602f-4785-8074-a6415bbebefb📥 Commits
Reviewing files that changed from the base of the PR and between
dad900c61dandbcf0374dc7.📒 Files selected for processing (2)
src/graphics/host_gpu/renderer/pipeline/descriptors.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
IsSupportedDepthTextureEncodingnow accepts metadata control values that contain onlyMETA_PIPE_ALIGNED, in addition to zero. A test checks that this value is accepted and that adding the DCC-control bit causes rejection.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
bcf03The change accepts the specified pipe-aligned, uncompressed depth descriptor and rejects its DCC-enabled variant. No concrete merge-blocking risk is established, though the game-level behavior was not tested.
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