graphics: keep views past MAX_MIP in the declared chain when its layout holds them (ASTRO BOT) #2172

Open
github-bot wants to merge 4 commits from github-bot/gh-2172 into main AGit
Owner

@⁠Nawid3333 on GitHub · 2026-11-08 00:00 UTC · original
Nawid3333:fix/mipview-tail-chain → main · +40 −14 · 2 files · 4 commits · open

ASTRO BOT (PPSA21564) exits on main early after boot with

unsupported texture mip view changes physical layout: base=6 last=6 max=5 extent=1920x1080x1 tile=27
 in src/graphics/host_gpu/renderer/pipeline/descriptors.cpp:611

A compute shader (IMAGE_LOAD_MIP) binds mip 6 of a 1920x1080 RGBA16F image with tile mode 27 as a storage image, through a T# with MAX_MIP 5 (dwords 055ea000,c4700000,010dc1df,91b66fac,0,00700050,0,0). Seven levels have the same layout as the declared six, and mip 6 lies in their mip tail. Before bd41e2f6c this view matched the declared chain; since bd41e2f6c every view past MAX_MIP is rebased onto a standalone chain of its own, which has no mip tail, so the match fails and the emulator exits. Main from 11-01 (893b03552) runs past this point with the same input.

Change. ResolveTextureMipView matches the view against the declared chain first, as before bd41e2f6c, and rebases only when that fails. The matching itself moves unchanged into MatchTextureMipView. The No Man's Sky case of bd41e2f6c still rebases (its declared one-level chain cannot hold mip 1), and TailMipViewPastMaxMip still exits.

When a view starts inside the declared chain and its LAST_LEVEL is past MAX_MIP, 39ecbab73 on main ends it at MAX_MIP, unless the shader selects mips dynamically. That does not reach this view: its fallback still exits when the base level is past the declared levels (base 6 of 6 here). With this change the first match is the same as on main, so 39ecbab73's fallback is unchanged for views that start inside the chain.

Test. A case in CheckRenderExecutorStencilBindingDiscovery (--storage-mip-host-only) resolves ASTRO BOT's T# and requires the seven-level 1920x1080 image with view base 6 and a created view, inside the test's mapping (now 32 MiB, since the chain alone is larger than the 8 MiB the old fixture left after its address).

  • On my PC (RX 9070 XT): main with the test exits with the message above; with this change the case passes. The selector's other four failures (depth feedback cases) are the same on main without the test, as are the full suite (186 ok, the same 4 failures, then an unsupported 2-sample format 129 on this GPU) and shader_cfg_tests.
  • ASTRO BOT with this change and the same input: no exit; the run compiles 136 vertex, 98 pixel and 77 compute shaders, where main stops after 37 compute shaders.
  • CI on this head (81d29d43c, rebased onto main 83df9c252): Windows, Linux and macOS build and pass the tests (run).

Written with Claude Code and OpenAI Codex (AI): the fix, the test and the measurements, run on my PC; reviewed by me.

**@⁠Nawid3333** on GitHub · 2026-11-08 00:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172) `Nawid3333:fix/mipview-tail-chain` → `main` · +40 −14 · 2 files · 4 commits · open ASTRO BOT (PPSA21564) exits on main early after boot with ``` unsupported texture mip view changes physical layout: base=6 last=6 max=5 extent=1920x1080x1 tile=27 in src/graphics/host_gpu/renderer/pipeline/descriptors.cpp:611 ``` A compute shader (`IMAGE_LOAD_MIP`) binds mip 6 of a 1920x1080 RGBA16F image with tile mode 27 as a storage image, through a T# with MAX_MIP 5 (dwords `055ea000,c4700000,010dc1df,91b66fac,0,00700050,0,0`). Seven levels have the same layout as the declared six, and mip 6 lies in their mip tail. Before bd41e2f6c this view matched the declared chain; since bd41e2f6c every view past MAX_MIP is rebased onto a standalone chain of its own, which has no mip tail, so the match fails and the emulator exits. Main from 11-01 (893b03552) runs past this point with the same input. **Change.** `ResolveTextureMipView` matches the view against the declared chain first, as before bd41e2f6c, and rebases only when that fails. The matching itself moves unchanged into `MatchTextureMipView`. The No Man's Sky case of bd41e2f6c still rebases (its declared one-level chain cannot hold mip 1), and `TailMipViewPastMaxMip` still exits. When a view starts inside the declared chain and its LAST_LEVEL is past MAX_MIP, 39ecbab73 on main ends it at MAX_MIP, unless the shader selects mips dynamically. That does not reach this view: its fallback still exits when the base level is past the declared levels (base 6 of 6 here). With this change the first match is the same as on main, so 39ecbab73's fallback is unchanged for views that start inside the chain. **Test.** A case in `CheckRenderExecutorStencilBindingDiscovery` (`--storage-mip-host-only`) resolves ASTRO BOT's T# and requires the seven-level 1920x1080 image with view base 6 and a created view, inside the test's mapping (now 32 MiB, since the chain alone is larger than the 8 MiB the old fixture left after its address). - On my PC (RX 9070 XT): main with the test exits with the message above; with this change the case passes. The selector's other four failures (depth feedback cases) are the same on main without the test, as are the full suite (186 ok, the same 4 failures, then an unsupported 2-sample format 129 on this GPU) and `shader_cfg_tests`. - ASTRO BOT with this change and the same input: no exit; the run compiles 136 vertex, 98 pixel and 77 compute shaders, where main stops after 37 compute shaders. - CI on this head (81d29d43c, rebased onto main 83df9c252): Windows, Linux and macOS build and pass the tests ([run](https://github.com/KytyPS5/KytyPS5/actions/runs/43278578608)). Written with Claude Code and OpenAI Codex (AI): the fix, the test and the measurements, run on my PC; reviewed by me.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
bd41e2f6c rebases every texture view that lies entirely past MAX_MIP onto its
own chain starting at the base mip. ASTRO BOT binds mip 6 of a 1920x1080
RGBA16F image (tile mode 27) as a storage image through a T# with MAX_MIP 5:
seven levels have the same layout as the declared six and mip 6 lies in the
mip tail, which a standalone one-level chain cannot express, so the game exits
with "unsupported texture mip view changes physical layout" 38 seconds after
start.

Match the view against the declared chain first, as before bd41e2f6c, and
rebase only when that fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:10 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-08 00:05 UTC · original · edited 2026-11-12 18:21 UTC

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MatchTextureMipView now receives the physical image and its level count. ResolveTextureMipView first tries to match against the declared image. If that fails and the view base level is at or beyond physical_levels, it builds a physical image from the selected mip extent and retries. Tests increase an allocation size and check a mip-6 texture descriptor's resource-level count, allocation bounds, base level, and texture-cache lookup.

Suggested reviewers: nmzik, defektu

Change: Bug fix

Merge Risk: Minimal · up to 81d29

This change keeps mip views past MAX_MIP within the declared chain when the layout holds them. That should stop the startup exit reported for ASTRO BOT. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: views past MAX_MIP are kept in the declared mip chain when its layout can hold them, and the ASTRO BOT target is named. It matches the changeset summary and PR objecti…
Description check Passed The description states the crash symptom, the root cause (bd41e2f6c rebasing views past MAX_MIP onto a standalone chain), the fix in ResolveTextureMipView and MatchTextureMipView, the added test in Ch…
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: Title check

Explanation

The title names the main change: views past MAX_MIP are kept in the declared mip chain when its layout can hold them, and the ASTRO BOT target is named. It matches the changeset summary and PR objectives, which describe matching against the declared chain first and rebasing only on failure.

Full details: Description check

Explanation

The description states the crash symptom, the root cause (bd41e2f6c rebasing views past MAX_MIP onto a standalone chain), the fix in ResolveTextureMipView and MatchTextureMipView, the added test in CheckRenderExecutorStencilBindingDiscovery, and the test results. It relates directly to the changeset.

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 84e7546eb0ca98829275f3ae7248982becde2fc2 and 81d29d43cb.

Files selected for processing: 1

  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-08 00:05 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172#issuecomment-6714824126) · edited 2026-11-12 18:21 UTC <!-- coderabbit-ai-generated:v1 --> <!-- 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/2172?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-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_status_start --> No actionable comments were generated in the recent review. <!-- recent_review_status_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> `MatchTextureMipView` now receives the physical image and its level count. `ResolveTextureMipView` first tries to match against the declared image. If that fails and the view base level is at or beyond `physical_levels`, it builds a physical image from the selected mip extent and retries. Tests increase an allocation size and check a mip-6 texture descriptor's resource-level count, allocation bounds, base level, and texture-cache lookup. **Suggested reviewers:** `nmzik`, `defektu` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"81d29d43cb151883949d5f0cfd3c1d1a3bf80e13" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>81d29</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `81d29` --> <!-- final_review_risk_coverage:{"sourceCommitId":"81d29d43cb151883949d5f0cfd3c1d1a3bf80e13","coveredCommitId":"81d29d43cb151883949d5f0cfd3c1d1a3bf80e13","kind":"reviewed"} --> This change keeps mip views past MAX_MIP within the declared chain when the layout holds them. That should stop the startup exit reported for ASTRO BOT. No actionable merge-blocking risk remains. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- 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-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary> <dl> <dd> <br> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title names the main change: views past MAX_MIP are kept in the declared mip chain when its layout can hold them, and the ASTRO BOT target is named. It matches the changeset summary and PR objecti… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description states the crash symptom, the root cause (bd41e2f6c rebasing views past MAX_MIP onto a standalone chain), the fix in ResolveTextureMipView and MatchTextureMipView, the added test in Ch… | | 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. | <details> <summary><strong>Full details: Title check</strong></summary> <dl> <dd> <br> **Explanation** The title names the main change: views past MAX_MIP are kept in the declared mip chain when its layout can hold them, and the ASTRO BOT target is named. It matches the changeset summary and PR objectives, which describe matching against the declared chain first and rebasing only on failure. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description states the crash symptom, the root cause (bd41e2f6c rebasing views past MAX_MIP onto a standalone chain), the fix in ResolveTextureMipView and MatchTextureMipView, the added test in CheckRenderExecutorStencilBindingDiscovery, and the test results. It relates directly to the changeset. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2172)! 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> <br> - [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) </dd> </dl> </details> <!-- tips_end --> <!-- recent_review_start --> <h6> <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <br> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/83df9c252ce13173b176e926abe2ab39e83295be/.coderabbit.yaml>) - **Commit**: [83df9c2](<https://github.com/KytyPS5/KytyPS5/commit/83df9c252ce13173b176e926abe2ab39e83295be>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `e4b48666-f8f5-4409-b813-1240112e28a8` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between 84e7546eb0ca98829275f3ae7248982becde2fc2 and 81d29d43cb151883949d5f0cfd3c1d1a3bf80e13. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 1</strong></summary> <dl> <dd> <br> * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- recent_review_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-08 00:06 UTC · original · reviewed

Additional comments: 1

src/graphics/host_gpu/renderer/pipeline/descriptors.cpp: 1

485-488: Trivial · Maintainability & Code Quality · Low value

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Verify that the retry path stays within the declared image's mip bounds.

declared.MipExtent(base_level) exits when base_level >= declared.resources.levels. The caller sets levels = max(physical_levels, base_level + view_levels), so base_level < levels holds. The bound is therefore met on this path.

The retry passes view_levels as physical_levels. The matcher then reads info.mip_layout[base_level + i] and calls info.MipExtent(source). Both stay below base_level + view_levels <= levels. The matcher body does not enforce this itself. A future caller with a smaller levels would hit EXIT in MipExtent.

Add EXIT_IF(base_level + view_levels > info.resources.levels) at the start of MatchTextureMipView to make the contract explicit. This is optional hardening. No current failing path is shown.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 751fbd0965 and 5aa6b3eb2922ffbaf7accd7c2079b95a18f04fb4.

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 10 included reviews per hour; 9 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-08 00:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172#pullrequestreview-5815675171) · **reviewed** <!-- coderabbit-ai-generated:v1 --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off.svg" width="16" height="16" align="absmiddle" alt=""></picture> Additional comments: 1</summary><blockquote> <dl> <dd> <br> <details> <summary>src/graphics/host_gpu/renderer/pipeline/descriptors.cpp: 1</summary><blockquote> <dl> <dd> <br> `485-488`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Maintainability & Code Quality** · **Low value** <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg" width="20" height="20" align="absmiddle" alt=""></picture> **Unverified finding** Verification ran but could not confirm this finding. It is shown for review, not as a verified issue. **Verify that the retry path stays within the declared image's mip bounds.** `declared.MipExtent(base_level)` exits when `base_level >= declared.resources.levels`. The caller sets `levels = max(physical_levels, base_level + view_levels)`, so `base_level < levels` holds. The bound is therefore met on this path. The retry passes `view_levels` as `physical_levels`. The matcher then reads `info.mip_layout[base_level + i]` and calls `info.MipExtent(source)`. Both stay below `base_level + view_levels <= levels`. The matcher body does not enforce this itself. A future caller with a smaller `levels` would hit `EXIT` in `MipExtent`. Add `EXIT_IF(base_level + view_levels > info.resources.levels)` at the start of `MatchTextureMipView` to make the contract explicit. This is optional hardening. No current failing path is shown. </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> <h6> <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <br> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/751fbd0965bdfe504335cb3577bd32d2ff8a1a15/.coderabbit.yaml>) - **Commit**: [751fbd0](<https://github.com/KytyPS5/KytyPS5/commit/751fbd0965bdfe504335cb3577bd32d2ff8a1a15>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `3340d4b6-dedd-4c9a-b94f-1bbda7da7517` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between 751fbd0965bdfe504335cb3577bd32d2ff8a1a15 and 5aa6b3eb2922ffbaf7accd7c2079b95a18f04fb4. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</summary> <dl> <dd> <br> * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=f19e8da0-1232-44ec-b1d5-d21b121a063f attempt=e7488cab-e1e1-43ea-96ad-fa3fcb9c0b11 batch=1/1 -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-09 15:19 UTC · original · reviewed

Additional comments: 1

tests/ShaderRecompilerComputeTests.cpp: 1

16697-16697: Trivial · Maintainability & Code Quality · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Keep the storage-image fixture inside mapped memory.

The descriptor starts 8 MiB into a 16 MiB mapping. Its 1920×1080 k16_16_16_16Float first mip alone needs more than 8 MiB. Increase the mapping to cover store.desc.info.data.size, then acquire the storage-image view. The current assertion checks the layout but cannot confirm that this fixture supports view acquisition. (raw.githubusercontent.com)

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f399d48183 and 34ef4bded63207e6d268971cc0ba064fdb9d5a77.

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 10 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-09 15:19 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172#pullrequestreview-5828020422) · **reviewed** <!-- coderabbit-ai-generated:v1 --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/message-square-off.svg" width="16" height="16" align="absmiddle" alt=""></picture> Additional comments: 1</summary><blockquote> <dl> <dd> <br> <details> <summary>tests/ShaderRecompilerComputeTests.cpp: 1</summary><blockquote> <dl> <dd> <br> `16697-16697`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Maintainability & Code Quality** · **Quick win** <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg" width="20" height="20" align="absmiddle" alt=""></picture> **Unverified finding** Verification ran but could not confirm this finding. It is shown for review, not as a verified issue. **Keep the storage-image fixture inside mapped memory.** The descriptor starts 8 MiB into a 16 MiB mapping. Its 1920×1080 `k16_16_16_16Float` first mip alone needs more than 8 MiB. Increase the mapping to cover `store.desc.info.data.size`, then acquire the storage-image view. The current assertion checks the layout but cannot confirm that this fixture supports view acquisition. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/34ef4bded63207e6d268971cc0ba064fdb9d5a77/tests/ShaderRecompilerComputeTests.cpp)) </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> <h6> <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <br> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/f399d481839722e6153d2ca190b7f669a7a40a6e/.coderabbit.yaml>) - **Commit**: [f399d48](<https://github.com/KytyPS5/KytyPS5/commit/f399d481839722e6153d2ca190b7f669a7a40a6e>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `d249d160-59ee-4638-bbf8-5634f5a3a4f0` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between f399d481839722e6153d2ca190b7f669a7a40a6e and 34ef4bded63207e6d268971cc0ba064fdb9d5a77. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</summary> <dl> <dd> <br> * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. </dd> </dl> </details> </h6> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=892603df-c5f9-4693-bdb7-93859c5661a0 attempt=cbf12848-3713-458d-8d8a-3cf3417da04d batch=1/1 -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-09 16:33 UTC · original · reviewed

Nitpick comments: 1

tests/ShaderRecompilerComputeTests.cpp: 1

16709-16709: Trivial · Maintainability & Code Quality · Quick win

Check that the mip-6 image view can be created.

ResolveTexture does not create the view. The descriptor assertions can pass even if FindTexture(store.image_id, store.desc) fails. Add a FindTexture check in an isolated fixture, as the adjacent fixed-storage case does.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f399d48183 and 79dbcf16a638b286fb3b04f00973f713249357c1.

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 10 included reviews per hour; 8 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-09 16:33 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172#pullrequestreview-5829095870) · **reviewed** <!-- coderabbit-ai-generated:v1 --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning.svg" width="16" height="16" align="absmiddle" alt=""></picture> Nitpick comments: 1</summary><blockquote> <dl> <dd> <br> <details> <summary>tests/ShaderRecompilerComputeTests.cpp: 1</summary><blockquote> <dl> <dd> <br> `16709-16709`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Maintainability & Code Quality** · **Quick win** **Check that the mip-6 image view can be created.** `ResolveTexture` does not create the view. The descriptor assertions can pass even if `FindTexture(store.image_id, store.desc)` fails. Add a `FindTexture` check in an isolated fixture, as the adjacent fixed-storage case does. <!-- cr-comment:v1:bc01df003b91ba3c86a3955e --> </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> <h6> <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <br> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/f399d481839722e6153d2ca190b7f669a7a40a6e/.coderabbit.yaml>) - **Commit**: [f399d48](<https://github.com/KytyPS5/KytyPS5/commit/f399d481839722e6153d2ca190b7f669a7a40a6e>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `709dd811-c70e-417e-9e6c-b33c0e90e6e4` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between f399d481839722e6153d2ca190b7f669a7a40a6e and 79dbcf16a638b286fb3b04f00973f713249357c1. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</summary> <dl> <dd> <br> * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. </dd> </dl> </details> </h6> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=50701e58-73f1-4a0e-baea-626f4971f1e6 attempt=8d99d301-768c-42f4-83a9-82b861d8ceb3 batch=1/1 -->
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-11-14 22:16 UTC · original

Independent confirmation on NVIDIA. Setup: Windows 11 Pro 26300, RTX 5090 (driver 621.24), Ryzen 9 5900X, clang-cl Release builds, ASTRO BOT PPSA21564.

Unit tests. Built this PR's head 81d29d43 and ran shader_recompiler_compute_tests with no selector: "all cases passed", RenderExecutorStencilBindingDiscovery and RebasedLastMipQueryStore included. TailMipViewPastMaxMip is a death test compiled out on Windows, so it was not exercised here.

Bisect. Before finding this PR I bisected the boot exit with git bisect run between eecd9821 (good) and 782a85c6 (bad). Each step built kyty_emulator and ran the game for 150 s from the same save; a step was bad if the log contained unsupported texture mip view changes physical layout.

Commit Result Shaders compiled before exit (VS / PS / CS)
c1d1003d good 80 / 78 / 60
9678c59b good 76 / 74 / 60
6d8d4c8b good 77 / 75 / 60
25918691 good 76 / 74 / 60
8ac946ce bad 11 / 18 / 37
7816ac79 bad 11 / 18 / 37
bd41e2f6 bad, first bad 11 / 18 / 37

Bad steps always stop at the same point (base=6 last=6 max=5 extent=1920x1080x1 tile=27), which matches your analysis.

Ordering note. My first local fix also tried the declared chain first, but it built the rebased chain from info after the first attempt had already run info.UpdateSize() on it. That version failed mip view past MAX_MIP in RenderExecutorStencilBindingDiscovery. Your version passes: it copies declared before either attempt. So does my second version, which rebases first from an untouched copy. I think the copy is what matters, not the order, but I have not isolated that.

In game, with this PR's code. Build: main 3e226bff + this PR's descriptors.cpp change (the two test-only commits were left out because they conflict with main's test file) + a port of #838. Starting with an empty shader cache, ASTRO BOT went from boot to worldmap at 0:29 and to aerial_garden at 0:46 (from the game's StartLevel log lines). I played the Garden level by hand for about 9.5 minutes with no exit and no dispatch skips. Per-second overlay figures (a local lab log line): FPS median 17.7, 10th percentile 10.2, worst frame per second 67 ms median; the CPU waits on the GPU about 920 ms of every second. An earlier build with an equivalent fallback but without #838 stopped at the level select (see #838).

AI use: Claude Code ran the bisect, the builds and the tests and drafted this with me; I played the game.

**@⁠ZrDaniel07** on GitHub · 2026-11-14 22:16 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2172#issuecomment-6885052720) Independent confirmation on NVIDIA. Setup: Windows 11 Pro 26300, RTX 5090 (driver 621.24), Ryzen 9 5900X, clang-cl Release builds, ASTRO BOT PPSA21564. **Unit tests.** Built this PR's head `81d29d43` and ran `shader_recompiler_compute_tests` with no selector: "all cases passed", `RenderExecutorStencilBindingDiscovery` and `RebasedLastMipQueryStore` included. `TailMipViewPastMaxMip` is a death test compiled out on Windows, so it was not exercised here. **Bisect.** Before finding this PR I bisected the boot exit with `git bisect run` between `eecd9821` (good) and `782a85c6` (bad). Each step built `kyty_emulator` and ran the game for 150 s from the same save; a step was bad if the log contained `unsupported texture mip view changes physical layout`. | Commit | Result | Shaders compiled before exit (VS / PS / CS) | |---|---|---| | `c1d1003d` | good | 80 / 78 / 60 | | `9678c59b` | good | 76 / 74 / 60 | | `6d8d4c8b` | good | 77 / 75 / 60 | | `25918691` | good | 76 / 74 / 60 | | `8ac946ce` | bad | 11 / 18 / 37 | | `7816ac79` | bad | 11 / 18 / 37 | | `bd41e2f6` | bad, first bad | 11 / 18 / 37 | Bad steps always stop at the same point (`base=6 last=6 max=5 extent=1920x1080x1 tile=27`), which matches your analysis. **Ordering note.** My first local fix also tried the declared chain first, but it built the rebased chain from `info` after the first attempt had already run `info.UpdateSize()` on it. That version failed `mip view past MAX_MIP` in `RenderExecutorStencilBindingDiscovery`. Your version passes: it copies `declared` before either attempt. So does my second version, which rebases first from an untouched copy. I think the copy is what matters, not the order, but I have not isolated that. **In game, with this PR's code.** Build: `main` `3e226bff` + this PR's `descriptors.cpp` change (the two test-only commits were left out because they conflict with `main`'s test file) + a port of #838. Starting with an empty shader cache, ASTRO BOT went from boot to `worldmap` at 0:29 and to `aerial_garden` at 0:46 (from the game's `StartLevel` log lines). I played the Garden level by hand for about 9.5 minutes with no exit and no dispatch skips. Per-second overlay figures (a local lab log line): FPS median 17.7, 10th percentile 10.2, worst frame per second 67 ms median; the CPU waits on the GPU about 920 ms of every second. An earlier build with an equivalent fallback but without #838 stopped at the level select (see #838). AI use: Claude Code ran the bisect, the builds and the tests and drafted this with me; I played the game.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2172/head:github-bot/gh-2172'
git switch 'github-bot/gh-2172'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2172'
git switch 'github-bot/gh-2172'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2172'
git switch 'github-bot/gh-2172'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2172'
git switch 'main'
git merge --squash 'github-bot/gh-2172'
git switch 'main'
git merge --ff-only 'github-bot/gh-2172'
git switch 'main'
git merge 'github-bot/gh-2172'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.