shader: treat undefined image format (139) as null descriptor for resource specialization #1467

Closed
github-bot wants to merge 2 commits from gh-pr/1467/head into gh-pr/1467/base
Owner

@⁠pedroMartinsMJ on GitHub · 2026-10-12 23:16 UTC · original
pedroMartinsMJ:fix-undefined-image-format → main · +128 −0 · 4 files · 2 commits · closed without merging

Problem

Demon's Souls (and other games) crash on startup with:

The PS5 GPU format encoding has gaps (137–155); a value like 139 names no real format. When a guest leaves a texture-table slot unfilled, the emulator may read leftover dwords that decode to an invalid format. Previously the recompiler aborted shader specialization with a fatal error (pipelineCache.cpp:250), preventing the game from starting.

Fix

  • Added IsDefinedBufferFormat() (src/graphics/guest_gpu/gpu_format.h/cpp) — table lookup confirming whether a format value names a real format (returns false for encoding gaps).
  • ValidImageDescriptor() now rejects undefined formats; those slots bind as a null image instead of aborting.
  • Rejected descriptors are logged once per (shader_hash, slot) via ReportRejectedImageDescriptor() (deduped, capped at 64, std::mutex guarded) to ease future debugging.
  • Added regression test TestUndefinedImageFormatBindsNullImage covering gap values 137/139/155, valid formats k4_4_4_4UNorm / kBc7Srgb, and a control (k32Float still binds its descriptor intact).

Testing (on this system)

Hardware / OS: Fedora 44 KDE, AMD Ryzen AI 9 365 (Zen 5), Radeon 880M, RADV/Mesa 26.2.4, Vulkan 1.4.

Game Result
Demon's Souls (PPSA01341-1.07) ✅ Booted and ran
./_Build/linux/install/resource_materialization_tests ✅ All cases passed

Impact

  • No effect on supported window managers or GPUs.
  • Keeps the shader semantically valid (no invalid SPIR-V produced).
  • Game continues instead of crashing; black textures may appear in unfilled slots (fidelity-equivalent to the console).

Checklist

  • Code follows project conventions (shader:, src/... paths)
  • Unit tests added and passing
  • Tested on Demon's Souls (boot + in-game)
  • Error messages clear and debuggable
  • No unintended files committed (_Build/ ignored)
**@⁠pedroMartinsMJ** on GitHub · 2026-10-12 23:16 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467) `pedroMartinsMJ:fix-undefined-image-format` → `main` · +128 −0 · 4 files · 2 commits · closed without merging ## Problem Demon's Souls (and other games) crash on startup with: The PS5 GPU format encoding has gaps (`137–155`); a value like `139` names no real format. When a guest leaves a texture-table slot unfilled, the emulator may read leftover dwords that decode to an invalid format. Previously the recompiler aborted shader specialization with a fatal error (`pipelineCache.cpp:250`), preventing the game from starting. ## Fix - Added `IsDefinedBufferFormat()` (`src/graphics/guest_gpu/gpu_format.h/cpp`) — table lookup confirming whether a format value names a real format (returns `false` for encoding gaps). - `ValidImageDescriptor()` now rejects undefined formats; those slots bind as a **null image** instead of aborting. - Rejected descriptors are logged once per `(shader_hash, slot)` via `ReportRejectedImageDescriptor()` (deduped, capped at 64, `std::mutex` guarded) to ease future debugging. - Added regression test `TestUndefinedImageFormatBindsNullImage` covering gap values `137/139/155`, valid formats `k4_4_4_4UNorm` / `kBc7Srgb`, and a control (`k32Float` still binds its descriptor intact). ## Testing (on this system) **Hardware / OS:** Fedora 44 KDE, AMD Ryzen AI 9 365 (Zen 5), Radeon 880M, RADV/Mesa 26.2.4, Vulkan 1.4. | Game | Result | |---|---| | Demon's Souls (PPSA01341-1.07) | ✅ Booted and ran | | `./_Build/linux/install/resource_materialization_tests` | ✅ All cases passed | ## Impact - No effect on supported window managers or GPUs. - Keeps the shader semantically valid (no invalid SPIR-V produced). - Game continues instead of crashing; black textures may appear in unfilled slots (fidelity-equivalent to the console). ## Checklist - [x] Code follows project conventions (`shader:`, `src/...` paths) - [x] Unit tests added and passing - [x] Tested on Demon's Souls (boot + in-game) - [x] Error messages clear and debuggable - [x] No unintended files committed (`_Build/` ignored)
NullImageDescriptor returns true when dwords[0] == 0 and the low byte of
dwords[1] == 0, which can match descriptors with a nonzero format field
(e.g. format 139 << 20 leaves the low byte of dwords[1] zero while the
upper bits are set). Using it as the silence guard in
ReportRejectedImageDescriptor caused rejections of partially-nonzero
descriptors to go unreported.

Check all eight dwords for zero instead; that is the correct definition
of 'truly empty slot that needs no log'. NullImageDescriptor is kept for
image-binding decisions where its looser test is intentional.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:57:19 +00:00
github-bot closed this pull request 2026-11-26 09:57:19 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-12 23:20 UTC · original · edited 2026-10-14 01:16 UTC

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: c918befb-1dee-4e9e-a7ff-0dd2bca8f4bb
📥 Commits

Reviewing files that changed from the base of the PR and between 9555b3b61b and bb8a66cd70.

📒 Files selected for processing: 1
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp

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

📝 Walkthrough

The change adds IsDefinedBufferFormat to identify buffer formats with table entries. Image descriptor validation rejects undefined formats. Materialization reports nonzero rejected descriptors with deduplication and a 64-pair limit, then clears rejected direct descriptors. Tests cover undefined formats and verify that defined formats remain unchanged.

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to bb8a6

Undefined image formats take the null-image fallback on both direct and indirect paths. No identified issue remains to block merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description clearly explains the undefined-format problem, the null-descriptor fix, logging behavior, tests, and validation results. It is directly related to the changeset.
Title check Passed The title clearly identifies the main change: treating an undefined image format as a null descriptor during resource specialization.
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.
  • 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 23:20 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#issuecomment-6134488282) · edited 2026-10-14 01:16 UTC <!-- 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/1467?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**: `c918befb-1dee-4e9e-a7ff-0dd2bca8f4bb` </dd> </dl> </details> <details> <summary><strong>📥 Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 9555b3b61bee35ea528b4864f6d6590758244814 and bb8a66cd703a093477482aba0bf3addc27642449. </dd> </dl> </details> <details> <summary><strong>📒 Files selected for processing: 1</strong></summary> <dl> <dd> * `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` </dd> </dl> </details> <details> <summary><strong>🚧 Files skipped from review as they are similar to previous changes: 1</strong></summary> <dl> <dd> * src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> <dl> <dd> The change adds `IsDefinedBufferFormat` to identify buffer formats with table entries. Image descriptor validation rejects undefined formats. Materialization reports nonzero rejected descriptors with deduplication and a 64-pair limit, then clears rejected direct descriptors. Tests cover undefined formats and verify that defined formats remain unchanged. </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ➖ Normal <!-- change_assessment_commit:"bb8a66cd703a093477482aba0bf3addc27642449" --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong>⚪ Minimal</strong> · up to <code>bb8a6</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `bb8a6` --> <!-- final_review_risk_coverage:{"sourceCommitId":"bb8a66cd703a093477482aba0bf3addc27642449","coveredCommitId":"bb8a66cd703a093477482aba0bf3addc27642449","kind":"reviewed"} --> Undefined image formats take the null-image fallback on both direct and indirect paths. No identified issue remains to block merging after normal checks. <!-- 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 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><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> 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 undefined-format problem, the null-descriptor fix, logging behavior, tests, and validation results. It is directly related to the changeset. | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly identifies the main change: treating an undefined image format as a null descriptor during resource specialization. | | 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. | </dd> </dl> </details> </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=1467)! 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) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-14 01:00 UTC · original · edited 2026-10-14 01:17 UTC
On src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp line 119 (outdated):

@@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false)
 	return true;
 }
 
+/// Reports an image descriptor that was rejected and bound as a null image. The same slot is
+/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a
+/// corrupt table from growing the set without limit.
+void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index,
+                                   const DescriptorValue& descriptor) {
+	if (NullImageDescriptor(descriptor)) {
+		return;

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Skip only all-zero descriptors in rejection reports.

If word 0 is zero and the low byte of word 1 is zero, NullImageDescriptor returns true even when the format or other descriptor words are nonzero. For example, a direct descriptor with format 139, a zero base address, and a nonzero image type is rejected and cleared without the promised report. Test all eight words for zero here; retain NullImageDescriptor for image-binding decisions.

✅ Addressed in commit bb8a66c

**@⁠coderabbitai[bot]** on GitHub · 2026-10-14 01:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#discussion_r4265688174) · edited 2026-10-14 01:17 UTC On `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` line 119 (outdated): ```diff @@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false) return true; } +/// Reports an image descriptor that was rejected and bound as a null image. The same slot is +/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a +/// corrupt table from growing the set without limit. +void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index, + const DescriptorValue& descriptor) { + if (NullImageDescriptor(descriptor)) { + return; ``` **🎯 Functional Correctness** | **🟡 Minor** | **⚡ Quick win** **Skip only all-zero descriptors in rejection reports.** If word 0 is zero and the low byte of word 1 is zero, `NullImageDescriptor` returns true even when the format or other descriptor words are nonzero. For example, a direct descriptor with format 139, a zero base address, and a nonzero image type is rejected and cleared without the promised report. Test all eight words for zero here; retain `NullImageDescriptor` for image-binding decisions. <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:dab8e13ea33b5a9046d8835d --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Addressed in commit bb8a66c
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-14 01:00 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2596a326-ada2-41e7-88e3-0bbfcda76624
📥 Commits

Reviewing files that changed from the base of the PR and between 68aef8dbfe54c368bae20bd0a2db9cc379b8efe3 and 9555b3b61b.

📒 Files selected for processing: 3
  • src/graphics/guest_gpu/gpu_format.cpp
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
  • tests/ResourceMaterializationTests.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.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-14 01:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#pullrequestreview-5511854715) · **reviewed** **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `2596a326-ada2-41e7-88e3-0bbfcda76624` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 68aef8dbfe54c368bae20bd0a2db9cc379b8efe3 and 9555b3b61bee35ea528b4864f6d6590758244814. </details> <details> <summary>📒 Files selected for processing: 3</summary> * `src/graphics/guest_gpu/gpu_format.cpp` * `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` * `tests/ResourceMaterializationTests.cpp` </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. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=e3a140ba-50a8-425b-9873-5032b7431d35 attempt=e43beb76-bb44-4faf-9a9e-51dd2ded46f2 batch=1/1 -->
Author
Owner

@⁠pedroMartinsMJ on GitHub · 2026-10-14 01:17 UTC · original
On src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp line 119 (outdated):

@@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false)
 	return true;
 }
 
+/// Reports an image descriptor that was rejected and bound as a null image. The same slot is
+/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a
+/// corrupt table from growing the set without limit.
+void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index,
+                                   const DescriptorValue& descriptor) {
+	if (NullImageDescriptor(descriptor)) {
+		return;

now checking all 8 dwords for zero instead of using NullImageDescriptor, sorry, I corrected that.

**@⁠pedroMartinsMJ** on GitHub · 2026-10-14 01:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#discussion_r4265773311) On `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` line 119 (outdated): ```diff @@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false) return true; } +/// Reports an image descriptor that was rejected and bound as a null image. The same slot is +/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a +/// corrupt table from growing the set without limit. +void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index, + const DescriptorValue& descriptor) { + if (NullImageDescriptor(descriptor)) { + return; ``` now checking all 8 dwords for zero instead of using NullImageDescriptor, sorry, I corrected that.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-14 01:17 UTC · original
On src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp line 119 (outdated):

@@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false)
 	return true;
 }
 
+/// Reports an image descriptor that was rejected and bound as a null image. The same slot is
+/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a
+/// corrupt table from growing the set without limit.
+void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index,
+                                   const DescriptorValue& descriptor) {
+	if (NullImageDescriptor(descriptor)) {
+		return;

@pedroMartinsMJ Thanks for the fix. The all-eight-dword check suppresses only all-zero descriptors and preserves reports for rejected nonzero descriptors.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

✅ Review thread resolved.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-14 01:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#discussion_r4265775131) On `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` line 119 (outdated): ```diff @@ -96,6 +110,29 @@ bool ValidImageDescriptor(const DescriptorValue& descriptor, bool r128 = false) return true; } +/// Reports an image descriptor that was rejected and bound as a null image. The same slot is +/// reported once per shader so a hot draw call does not flood the log, and the cap keeps a +/// corrupt table from growing the set without limit. +void ReportRejectedImageDescriptor(const ResourcePlan& program, uint32_t index, + const DescriptorValue& descriptor) { + if (NullImageDescriptor(descriptor)) { + return; ``` `@pedroMartinsMJ` Thanks for the fix. The all-eight-dword check suppresses only all-zero descriptors and preserves reports for rejected nonzero descriptors. --- <!-- This is an auto-generated comment: tweet message by coderabbit.ai --> If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=Check%20all%208%20descriptor%20dwords%20before%20skipping%20rejection%20reports%E2%80%94NullImageDescriptor%20can%20hide%20nonzero%20format%2Ftype%20data.%20Keep%20it%20for%20binding%20decisions.%20Try%20%40coderabbitai%20%F0%9F%90%87&url=https%3A%2F%2Fgithub.com%2FKytyPS5%2FKytyPS5%2Fpull%2F1467%23discussion_r4265688174)? Thank you for using CodeRabbit! <!-- end of auto-generated comment: tweet message by coderabbit.ai --> ✅ Review thread resolved. _You are interacting with an AI system._ <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

@⁠Nmzik on GitHub · 2026-10-21 19:42 UTC · original

Duplicate of #1019.

**@⁠Nmzik** on GitHub · 2026-10-21 19:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1467#issuecomment-6324940757) Duplicate of #1019.

Pull request closed

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