shader: raise ShaderInfo::MaxImages from 64 to 128 #2292

Open
github-bot wants to merge 1 commit from github-bot/gh-2292 into main AGit
Owner

@⁠RubyUwU56 on GitHub · 2026-11-15 22:23 UTC · original
RubyUwU56:patch-1 → main · +1 −1 · 1 files · 1 commits · open

Code Vein II (PPSA23908) crashes at boot with:

shader resource tracking: hash=0x9fcaf641322a7c96 stage=compute pc=0x0000a794
image resource limit exceeded (ResourceTracking.cpp)

One of its compute shaders references more than 64 image resources.
MaxImages is only checked in ResourceTracking::AddImage, and images are stored
in a std::vector, so raising the limit to 128 doesn't affect any fixed-size arrays.

With this change the game boots past the crash, plays the intro at a stable
60 FPS and reaches the character creator.

Tested on: Windows 11, RTX 2080 Ti, 32 GB RAM, Pro mode off.

Note: resource_materialization fails on main independently of this change.

Code Vein II character creator running on KytyPS5
**@⁠RubyUwU56** on GitHub · 2026-11-15 22:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292) `RubyUwU56:patch-1` → `main` · +1 −1 · 1 files · 1 commits · open Code Vein II (PPSA23908) crashes at boot with: shader resource tracking: hash=0x9fcaf641322a7c96 stage=compute pc=0x0000a794 image resource limit exceeded (ResourceTracking.cpp) One of its compute shaders references more than 64 image resources. `MaxImages` is only checked in `ResourceTracking::AddImage`, and images are stored in a `std::vector`, so raising the limit to 128 doesn't affect any fixed-size arrays. With this change the game boots past the crash, plays the intro at a stable 60 FPS and reaches the character creator. **Tested on:** Windows 11, RTX 2080 Ti, 32 GB RAM, Pro mode off. **Note:** `resource_materialization` fails on `main` independently of this change. <img width="1917" height="1079" alt="Code Vein II character creator running on KytyPS5" src="https://github.com/user-attachments/assets/6eed3a02-c151-4046-a38e-d0db0c6f3ebd" />
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:18:18 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 22:27 UTC · original

Explain Change →

Walkthrough

ShaderInfo::MaxImages increases from 64 to 128.

Suggested reviewers: nmzik, senaxx

Change: Bug fix

Merge Risk: Low · up to 76ac6

The change lets Code Vein II get past its boot crash. On a GPU whose per-stage resource limit is at the Vulkan minimum, shaders that combine many images and buffers could still fail to create pipelines. This is unlikely on common hardware, so merge risk is low, and a follow-up check against the device limit is advisable.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the single change in the changeset: ShaderInfo::MaxImages is raised from 64 to 128 in ShaderIR.h. The raw summary confirms this is the only modified value (+1/-1 lines), so the title …
Description check Passed The description explains the reason for the change: a Code Vein II compute shader references more than 64 image resources and hits the MaxImages limit in ResourceTracking::AddImage. It also gives the …
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 states the single change in the changeset: ShaderInfo::MaxImages is raised from 64 to 128 in ShaderIR.h. The raw summary confirms this is the only modified value (+1/-1 lines), so the title matches the main change.

Full details: Description check

Explanation

The description explains the reason for the change: a Code Vein II compute shader references more than 64 image resources and hits the MaxImages limit in ResourceTracking::AddImage. It also gives the reasoning that the std::vector storage is unaffected, and it lists test results. This 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

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 22:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#issuecomment-6902410959) <!-- 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/2292?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 --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> `ShaderInfo::MaxImages` increases from 64 to 128. **Suggested reviewers:** `nmzik`, `senaxx` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"76ac681cf9261541789e6e9f07b957efa1a9ff2d" --> <!-- 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-low-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Low</strong> · up to <code>76ac6</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `76ac6` --> <!-- final_review_risk_coverage:{"sourceCommitId":"76ac681cf9261541789e6e9f07b957efa1a9ff2d","coveredCommitId":"76ac681cf9261541789e6e9f07b957efa1a9ff2d","kind":"reviewed"} --> The change lets Code Vein II get past its boot crash. On a GPU whose per-stage resource limit is at the Vulkan minimum, shaders that combine many images and buffers could still fail to create pipelines. This is unlikely on common hardware, so merge risk is low, and a follow-up check against the device limit is advisable. <!-- 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 states the single change in the changeset: ShaderInfo::MaxImages is raised from 64 to 128 in ShaderIR.h. The raw summary confirms this is the only modified value (+1/-1 lines), so the title … | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the reason for the change: a Code Vein II compute shader references more than 64 image resources and hits the MaxImages limit in ResourceTracking::AddImage. It also gives the … | | 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 states the single change in the changeset: ShaderInfo::MaxImages is raised from 64 to 128 in ShaderIR.h. The raw summary confirms this is the only modified value (+1/-1 lines), so the title matches the main change. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description explains the reason for the change: a Code Vein II compute shader references more than 64 image resources and hits the MaxImages limit in ResourceTracking::AddImage. It also gives the reasoning that the std::vector storage is unaffected, and it lists test results. This 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=2292)! 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 -->
@ -524,3 +524,3 @@
struct ShaderInfo {
static constexpr uint32_t MaxBufferRoots = 64;
static constexpr uint32_t MaxImages = 64;
static constexpr uint32_t MaxImages = 128;
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 22:27 UTC · original · edited 2026-11-15 22:32 UTC

Major · Stability & Availability · Heavy lift

Count live buffers against the per-stage resource limit before layout creation.

CreateLayouts counts storage buffers and images in the same per-stage stage_resources total. MaxImages now allows up to 128 non-heap images. A compute shader with 100 image descriptors and 29 live buffers gives a combined count of 129. On a device at the Vulkan minimum of maxPerStageResources (128), CreateLayouts calls EXIT and the pipeline is not created. A shader with 64 images and 64 buffers still totals 128 and passes.

Before the layout is created, check the combined image and buffer count against maxPerStageResources. Keep the image cap in ResourceTracking.cpp at the new value only if the combined count also fits the device. The fix needs the device limit in the shader-resource path, so it is not a single-line edit.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 22:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#discussion_r4580520388) · edited 2026-11-15 22:32 UTC <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/major-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Major** · **Stability & Availability** · **Heavy lift** **Count live buffers against the per-stage resource limit before layout creation.** `CreateLayouts` counts storage buffers and images in the same per-stage `stage_resources` total. `MaxImages` now allows up to 128 non-heap images. A compute shader with 100 image descriptors and 29 live buffers gives a combined count of 129. On a device at the Vulkan minimum of `maxPerStageResources` (128), `CreateLayouts` calls `EXIT` and the pipeline is not created. A shader with 64 images and 64 buffers still totals 128 and passes. Before the layout is created, check the combined image and buffer count against `maxPerStageResources`. Keep the image cap in `ResourceTracking.cpp` at the new value only if the combined count also fits the device. The fix needs the device limit in the shader-resource path, so it is not a single-line edit. <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:51e1bd78d74156fee981fdaf --> <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 41e2147c07 and 76ac681cf9.

Files selected for processing: 1

  • src/graphics/shader/recompiler/ir/ShaderIR.h

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-15 22:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#pullrequestreview-5913249683) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** <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/41e2147c07bcc6d2206cb2b84e4646497896a18e/.coderabbit.yaml>) - **Commit**: [41e2147](<https://github.com/KytyPS5/KytyPS5/commit/41e2147c07bcc6d2206cb2b84e4646497896a18e>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `b5646e97-83ca-426f-a363-1886d3f3978f` </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 41e2147c07bcc6d2206cb2b84e4646497896a18e and 76ac681cf9261541789e6e9f07b957efa1a9ff2d. </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: 1</summary> <dl> <dd> <br> * `src/graphics/shader/recompiler/ir/ShaderIR.h` </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=f5a5d62b-83f9-4814-bb1c-222ba44296ab attempt=fd9e9c82-9ec1-400c-b34a-a8e474b7b05f batch=1/1 -->
@ -524,3 +524,3 @@
struct ShaderInfo {
static constexpr uint32_t MaxBufferRoots = 64;
static constexpr uint32_t MaxImages = 64;
static constexpr uint32_t MaxImages = 128;
Author
Owner

@⁠RubyUwU56 on GitHub · 2026-11-15 22:32 UTC · original

Good catch, but I don't think this is a regression:

  • Only shaders with more than 64 image resources can now exceed 128 combined
    descriptors, and those shaders already failed before this change
    ("image resource limit exceeded" in ResourceTracking). On a device at the
    Vulkan minimum they now fail in CreateLayouts instead, so the outcome for
    them is the same.
  • Shaders with ≤ 64 images behave exactly as before.
  • On typical desktop GPUs (NVIDIA/AMD) maxPerStageResources is far above 128,
    so the raised cap actually lets these shaders run (e.g. Code Vein II).

Making the image cap depend on the device limit would be the cleaner solution,
but it requires passing the device limits into the shader-resource path. I'd
prefer to keep this PR minimal and can follow up with that if the maintainers
want it.

**@⁠RubyUwU56** on GitHub · 2026-11-15 22:32 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#discussion_r4580537279) Good catch, but I don't think this is a regression: - Only shaders with more than 64 image resources can now exceed 128 combined descriptors, and those shaders already failed before this change ("image resource limit exceeded" in ResourceTracking). On a device at the Vulkan minimum they now fail in CreateLayouts instead, so the outcome for them is the same. - Shaders with ≤ 64 images behave exactly as before. - On typical desktop GPUs (NVIDIA/AMD) maxPerStageResources is far above 128, so the raised cap actually lets these shaders run (e.g. Code Vein II). Making the image cap depend on the device limit would be the cleaner solution, but it requires passing the device limits into the shader-resource path. I'd prefer to keep this PR minimal and can follow up with that if the maintainers want it.
@ -524,3 +524,3 @@
struct ShaderInfo {
static constexpr uint32_t MaxBufferRoots = 64;
static constexpr uint32_t MaxImages = 64;
static constexpr uint32_t MaxImages = 128;
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 22:34 UTC · original

Analysis chain

Script executed:

#!/bin/bash
set -u
echo '--- Revision ---'
git rev-parse HEAD
echo '--- Image limit references ---'
rg -n -C 5 '\bMaxImages\b|image resource limit exceeded'
echo '--- Layout limit references ---'
rg -n -C 8 '\bstage_resources\b|\bmaxPerStageResources\b|\bCreateLayouts\s*\(' src
echo '--- Candidate source outlines ---'
fd -t f 'ResourceTracking\.cpp$|Pipeline.*\.cpp$|Layout.*\.cpp$' src/graphics | while IFS= read -r f; do
  echo "--- $f"
  ast-grep outline "$f" --items all --match 'AddImage|CreateLayouts' 2>/dev/null || true
done
echo '--- Commit difference ---'
git diff '76ac681cf9261541789e6e9f07b957efa1a9ff2d^' 76ac681cf9261541789e6e9f07b957efa1a9ff2d -- src/graphics/shader/recompiler/ir/ShaderIR.h

Length of output: 12532


Script executed:

#!/bin/bash
set -u
echo '--- ResourceTracking outline ---'
ast-grep outline src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp --items all --match 'ResourceTracking|Fail|AddImage' 2>/dev/null || true
echo '--- AddImage implementation ---'
cat -n src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp | sed -n '4110,4210p'
echo '--- ResourceTracking failure path ---'
rg -n -C 4 '\bFail\s*\(|resource_tracking_complete|TrackResources\s*\(' src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp | head -n 120
echo '--- Image mutation paths ---'
rg -n -C 3 '\b(?:m_info|info|program\.info)\.images\.(?:push_back|emplace_back|resize|insert|assign|clear)\s*\(' src/graphics
echo '--- Layout setup ---'
ast-grep outline src/graphics/host_gpu/renderer/pipeline/shaders.cpp --items all --match 'CreateLayouts|AddLayoutBindings' 2>/dev/null || true
cat -n src/graphics/host_gpu/renderer/pipeline/shaders.cpp | sed -n '45,125p'

Length of output: 18328


Script executed:

#!/bin/bash
set -u
echo '--- Image descriptor count construction ---'
rg -n -C 5 'descriptor_counts|mip_count|indirect_resources' src/graphics/shader/recompiler | rg -n -C 3 'descriptor_counts|mip_count|image|Image' | head -n 260
echo '--- Image vector operations across shader sources ---'
rg -n -C 3 '\.images\.(push_back|emplace_back|resize|insert|assign|clear)\s*\(' src/graphics/shader

Length of output: 31617


@RubyUwU56 You’re right. If a shader had more than 64 tracked images, it already failed in ResourceTracking. Reaching the device-limit check later is not, by itself, a regression. I withdraw the finding.

One clarification: native image descriptors do not always map one-to-one to tracked images. DefineDescriptors adds image.mip_count to the descriptor count, and materialization can add indirect images. My example of 100 descriptors alone does not establish how many images resource tracking counted.

I agree that device-aware resource handling can be separate from this PR.


📝 Learnings were not changed: only organization members or users with write access to this repository can add or remove learnings.

Review thread resolved.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 22:34 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#discussion_r4580541682) <!-- coderabbit-ai-generated:v1 --> <details> <summary>Analysis chain</summary> <dl> <dd> <br> Script executed: ```shell #!/bin/bash set -u echo '--- Revision ---' git rev-parse HEAD echo '--- Image limit references ---' rg -n -C 5 '\bMaxImages\b|image resource limit exceeded' echo '--- Layout limit references ---' rg -n -C 8 '\bstage_resources\b|\bmaxPerStageResources\b|\bCreateLayouts\s*\(' src echo '--- Candidate source outlines ---' fd -t f 'ResourceTracking\.cpp$|Pipeline.*\.cpp$|Layout.*\.cpp$' src/graphics | while IFS= read -r f; do echo "--- $f" ast-grep outline "$f" --items all --match 'AddImage|CreateLayouts' 2>/dev/null || true done echo '--- Commit difference ---' git diff '76ac681cf9261541789e6e9f07b957efa1a9ff2d^' 76ac681cf9261541789e6e9f07b957efa1a9ff2d -- src/graphics/shader/recompiler/ir/ShaderIR.h ``` Length of output: 12532 --- Script executed: ```shell #!/bin/bash set -u echo '--- ResourceTracking outline ---' ast-grep outline src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp --items all --match 'ResourceTracking|Fail|AddImage' 2>/dev/null || true echo '--- AddImage implementation ---' cat -n src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp | sed -n '4110,4210p' echo '--- ResourceTracking failure path ---' rg -n -C 4 '\bFail\s*\(|resource_tracking_complete|TrackResources\s*\(' src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp | head -n 120 echo '--- Image mutation paths ---' rg -n -C 3 '\b(?:m_info|info|program\.info)\.images\.(?:push_back|emplace_back|resize|insert|assign|clear)\s*\(' src/graphics echo '--- Layout setup ---' ast-grep outline src/graphics/host_gpu/renderer/pipeline/shaders.cpp --items all --match 'CreateLayouts|AddLayoutBindings' 2>/dev/null || true cat -n src/graphics/host_gpu/renderer/pipeline/shaders.cpp | sed -n '45,125p' ``` Length of output: 18328 --- Script executed: ```shell #!/bin/bash set -u echo '--- Image descriptor count construction ---' rg -n -C 5 'descriptor_counts|mip_count|indirect_resources' src/graphics/shader/recompiler | rg -n -C 3 'descriptor_counts|mip_count|image|Image' | head -n 260 echo '--- Image vector operations across shader sources ---' rg -n -C 3 '\.images\.(push_back|emplace_back|resize|insert|assign|clear)\s*\(' src/graphics/shader ``` Length of output: 31617 --- </dd> </dl> </details> `@RubyUwU56` You’re right. If a shader had more than 64 tracked images, it already failed in `ResourceTracking`. Reaching the device-limit check later is not, by itself, a regression. I withdraw the finding. One clarification: native image descriptors do not always map one-to-one to tracked images. `DefineDescriptors` adds `image.mip_count` to the descriptor count, and materialization can add indirect images. My example of 100 descriptors alone does not establish how many images resource tracking counted. I agree that device-aware resource handling can be separate from this PR. --- > 📝 Learnings were not changed: only organization members or users with write access to this repository can add or remove learnings. <!-- <review_comment_withdrawn> --> Review thread resolved. <sub><i>You are interacting with an AI system.</i></sub> <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-18 08:36 UTC · original

Baldur's Gate 3 (PPSA18463, #2334) stops at this limit too, after its main menu and character creation:

shader resource tracking: hash=0xec3ca42a550fe755 stage=compute pc=0x00000a20 image resource limit exceeded

@⁠Crispy81 ran a fork build with this commit on top of official 2638b1b and a stencil-only depth-target change the game needs before that point: it goes in game (Windows build, run 44248636917).

**@⁠Nawid3333** on GitHub · 2026-11-18 08:36 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2292#issuecomment-6973374896) Baldur's Gate 3 (PPSA18463, #2334) stops at this limit too, after its main menu and character creation: ``` shader resource tracking: hash=0xec3ca42a550fe755 stage=compute pc=0x00000a20 image resource limit exceeded ``` @⁠Crispy81 ran a fork build with this commit on top of official `2638b1b` and a stencil-only depth-target change the game needs before that point: it [goes in game](https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/2334) (Windows build, [run 44248636917](https://github.com/Nawid3333/KytyPS5/actions/runs/44248636917)).
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/2292/head:github-bot/gh-2292'
git switch 'github-bot/gh-2292'

Merge

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