graphics: accept pipe-aligned uncompressed depth textures (Guardians of the Galaxy, #1004) #1438

Closed
github-bot wants to merge 1 commit from gh-pr/1438/head into gh-pr/1438/base
Owner

@⁠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 merging

Stop: Marvel's Guardians of the Galaxy (PPSA01748) exits on the loading screen before the main menu, every launch (#1004, official f53e5d2, and source build 8cbee7f on an RX 7600):

unsupported sampled depth image: resource=1 encoding=0 view=1 class=1 numeric=1 dimension=3 ... guest_format=22 swizzle=0x204 ...
  dwords=03d48800,c1600000,010dc1df,91800204,00000000,00700000,00080000,00000000
  in src/graphics/host_gpu/renderer/pipeline/descriptors.cpp:209

Main 5b730d4 still has the same check (IsSupportedDepthTextureEncoding, now reached from descriptors.cpp:184 / EXIT at :193).

Cause: only encoding fails. The T# is a 1920x1080 D32 view (format 22, tile mode depth, 2D, R001 swizzle). DWORD 6 is 0x00080000: META_PIPE_ALIGNED (bit 19) set, COMPRESSION_EN (bit 21) clear, metadata address 0. IsSupportedDepthTextureEncoding accepts only a zero metadata control or the full HTILE control 0x00280000 (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 adds COMPRESSION_EN only 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: CheckDepthTextureEncoding adds 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:

  • descriptors.cpp compiles with zig/clang x86_64-linux-gnu, -std=c++20 -Wall -Wextra: rc=0. The only warnings are the two -Wsign-compare ones main already has in the same file (lines 939/940 on main).
  • tests/ShaderRecompilerComputeTests.cpp passes -fsyntax-only with 0 errors.
  • I ran a native harness of the real IsSupportedDepthTextureEncoding against the real CheckDepthTextureEncoding. With this change all 8 cases pass. On main the new case fails and the 7 existing ones pass.
  • clang-format 23.1.3 (src/.clang-format) on the changed lines: clean.
  • Applies cleanly to main 5b730d4 and 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:

  • I don't have the game or a GPU (aarch64 sandbox), so I haven't run GotG with this change. In #1004, hackerinfo89 reports that an equivalent local change gets the game past this exit.
  • The reporter's next stop on 8cbee7f was a loop-indexed image table in PS 0xb86c8dfc3f2471af ("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).

**@⁠overlordxrz-source** on GitHub · 2026-10-12 03:48 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1438) `overlordxrz-source:graphics/depth-pipe-aligned` → `main` · +15 −1 · 2 files · 1 commits · closed without merging **Stop:** Marvel's Guardians of the Galaxy (PPSA01748) exits on the loading screen before the main menu, every launch (#1004, official f53e5d2, and source build 8cbee7f on an RX 7600): ``` unsupported sampled depth image: resource=1 encoding=0 view=1 class=1 numeric=1 dimension=3 ... guest_format=22 swizzle=0x204 ... dwords=03d48800,c1600000,010dc1df,91800204,00000000,00700000,00080000,00000000 in src/graphics/host_gpu/renderer/pipeline/descriptors.cpp:209 ``` Main 5b730d4 still has the same check (`IsSupportedDepthTextureEncoding`, now reached from descriptors.cpp:184 / EXIT at :193). **Cause:** only `encoding` fails. The T# is a 1920x1080 D32 view (format 22, tile mode depth, 2D, R001 swizzle). DWORD 6 is `0x00080000`: META_PIPE_ALIGNED (bit 19) set, COMPRESSION_EN (bit 21) clear, metadata address 0. `IsSupportedDepthTextureEncoding` accepts only a zero metadata control or the full HTILE control `0x00280000` (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 adds `COMPRESSION_EN` only 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:** `CheckDepthTextureEncoding` adds 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:** - descriptors.cpp compiles with zig/clang x86_64-linux-gnu, `-std=c++20 -Wall -Wextra`: rc=0. The only warnings are the two `-Wsign-compare` ones main already has in the same file (lines 939/940 on main). - `tests/ShaderRecompilerComputeTests.cpp` passes `-fsyntax-only` with 0 errors. - I ran a native harness of the real `IsSupportedDepthTextureEncoding` against the real `CheckDepthTextureEncoding`. With this change all 8 cases pass. On main the new case fails and the 7 existing ones pass. - clang-format 23.1.3 (src/.clang-format) on the changed lines: clean. - Applies cleanly to main 5b730d4 and 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:** - I don't have the game or a GPU (aarch64 sandbox), so I haven't run GotG with this change. In #1004, hackerinfo89 reports that an equivalent local change gets the game past this exit. - The reporter's next stop on 8cbee7f was a loop-indexed image table in PS `0xb86c8dfc3f2471af` ("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).
Marvel's Guardians of the Galaxy (PPSA01748) stops on the loading screen
with "unsupported sampled depth image: resource=1 encoding=0 view=1"
(#1004). The T# is a 1920x1080 D32 depth view whose DWORD 6 is
0x00080000: META_PIPE_ALIGNED (bit 19) set, COMPRESSION_EN (bit 21)
clear, metadata address 0. hackerinfo89 traced the stop to this check.

IsSupportedDepthTextureEncoding accepted only a zero metadata control or
the full HTILE control 0x00280000. META_PIPE_ALIGNED only selects the
layout of a metadata surface; without COMPRESSION_EN the texture unit
reads no HTILE. Mesa builds such descriptors as well: its GFX10 FMASK
descriptor always sets META_PIPE_ALIGNED and adds COMPRESSION_EN only
for TC-compatible CMASK (ac_build_fmask_descriptor in
src/amd/common/ac_descriptors.c).

Treat a control with only META_PIPE_ALIGNED like a zero one. As before,
an inactive metadata address is ignored. Any other bit still takes the
HTILE path and its checks.

tests: CheckDepthTextureEncoding adds the reported descriptor, and the
same descriptor with ALPHA_IS_ON_MSB, which stays rejected.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:56:41 +00:00
github-bot closed this pull request 2026-11-26 09:56:41 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-12 03:50 UTC · original

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a866067d-602f-4785-8074-a6415bbebefb

📥 Commits

Reviewing files that changed from the base of the PR and between dad900c61d and bcf0374dc7.


📒 Files selected for processing (2)
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • tests/ShaderRecompilerComputeTests.cpp

Included 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

IsSupportedDepthTextureEncoding now accepts metadata control values that contain only META_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: nmzik


Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to bcf03

The 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 | Passed 4 | Inconclusive 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage Inconclusive 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check Passed The description clearly explains the unsupported depth-texture issue, the code change, the added tests, and the verification performed.
Title check Passed The title clearly identifies the main change: accepting pipe-aligned uncompressed depth textures. The Guardians of the Galaxy reference provides useful context.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

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.)


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-12 03:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1438#issuecomment-6117409308) <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1438?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary><strong>ℹ️ Recent review info</strong></summary> <dl> <dd> <details> <summary><strong>⚙️ Run configuration</strong></summary> <dl> <dd> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `a866067d-602f-4785-8074-a6415bbebefb` <hr> </dd> </dl> </details> <details> <summary><strong>📥 Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between dad900c61d6c7ff8aefc9e666ca7c3de4bbf4176 and bcf0374dc77954b61fefb52ed70352237f2baf61. <hr> </dd> </dl> </details> <details> <summary><strong>📒 Files selected for processing (2)</strong></summary> <dl> <dd> * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `tests/ShaderRecompilerComputeTests.cpp` <hr> </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. <hr> </dd> </dl> </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> <dl> <dd> ## Walkthrough `IsSupportedDepthTextureEncoding` now accepts metadata control values that contain only `META_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:** `nmzik` <hr> </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ➖ Normal <!-- change_assessment_commit:"bcf0374dc77954b61fefb52ed70352237f2baf61" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** **⚪ Minimal** · up to `bcf03` <!-- final_review_risk_coverage:{"sourceCommitId":"bcf0374dc77954b61fefb52ed70352237f2baf61","coveredCommitId":"bcf0374dc77954b61fefb52ed70352237f2baf61","kind":"reviewed"} --> The 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. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks | <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v1.svg" width="14" height="17" align="middle" alt="Passed" title="Passed"></picture></sup> 4 | <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v1.svg" width="14" height="17" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary> <dl> <dd> ### ❌ Failed checks (1 inconclusive) | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | 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 … | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong>✅ Passed checks (4 passed)</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description clearly explains the unsupported depth-texture issue, the code change, the added tests, and the verification performed. | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly identifies the main change: accepting pipe-aligned uncompressed depth textures. The Guardians of the Galaxy reference provides useful context. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <hr> </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **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.) </dd> </dl> </details> <hr> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1438)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) <hr> </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.