graphics: bind a texture with no mapped byte as null (Uncharted: Legacy of Thieves Collection) #2409

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

@⁠Nawid3333 on GitHub · 2026-11-19 15:00 UTC · original
Nawid3333:fix/unmapped-texture-null → main · +117 −1 · 7 files · 4 commits · open

Uncharted: Legacy of Thieves Collection (PPSA05389, #2385) stops after starting a new game:

Not implemented (desc.info.data.size == 0 || alignment == 0 || (address & (static_cast<uint64_t>(alignment) - 1u)) != 0) in .../pipeline/descriptors.cpp:623

A diagnostic build printed the texture at that check: T# dwords 00000006,caf00000,001fc01f,d0970324,00000000,00700070,00000000,00000000, base address 0x600 (Base40 field 6), 128x128, 8 levels, 64 KiB with 64 KiB alignment, not a heap texture. Nothing is mapped at 0x600, so the alignment condition fails. ResolveTexture already binds a null texture when the base field is 0, and for a heap texture that is not mapped.

Change

  • RenderContext::IsAnyMapped (any byte of the range mapped). ResolveTexture binds a null texture when a non-heap texture with a size has no mapped byte. A texture with at least one mapped byte takes the existing path.
  • Callers that use the binding's image now handle a null binding: RebindImages skips a re-resolve that returns null, TryConsumeComputeFill declines the fill, and ProcessPssr exits on a missing PSSR image.

Test

--unmapped-texture-only (new CTest unmapped_texture):

  • the reporter's T#: binds null and registers no image. With the new check removed it stops with the reporter's message at descriptors.cpp:623.
  • a texture with half of its 64 KiB mapped still resolves with an image. With IsAnyMapped changed to require the whole range, this case fails.

--compute-meta-clear-only gets a stencil fill whose destination is unmapped; the fill is declined.

Windows 11, RX 9070 XT, clang-cl. The compute test cases need the robust-buffer harness change of #2038 on this GPU. Fork CI run 44538705191: Windows passes (the CI runners have no GPU, so the GPU tests run only locally); Linux and macOS fail only in VirtualMemoryAllocationTests (AmmRemapIntoPrt failed: submit AMM commands returned 0x80020016), which fails the same way on main 5ad27cdd1.

Game

@⁠Crispy81 ran a fork build with this change (#2385): Uncharted 4: A Thief's End now gets past this stop and runs until a different texture cache stop (unresolvable equal-address image overlap), handled separately.

Written with Claude Code (AI): Claude Code found the cause from the tester's log line, wrote the change and the tests, and ran them.

**@⁠Nawid3333** on GitHub · 2026-11-19 15:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409) `Nawid3333:fix/unmapped-texture-null` → `main` · +117 −1 · 7 files · 4 commits · open Uncharted: Legacy of Thieves Collection (PPSA05389, #2385) stops after starting a new game: ``` Not implemented (desc.info.data.size == 0 || alignment == 0 || (address & (static_cast<uint64_t>(alignment) - 1u)) != 0) in .../pipeline/descriptors.cpp:623 ``` A diagnostic build printed the texture at that check: T# dwords `00000006,caf00000,001fc01f,d0970324,00000000,00700070,00000000,00000000`, base address 0x600 (Base40 field 6), 128x128, 8 levels, 64 KiB with 64 KiB alignment, not a heap texture. Nothing is mapped at 0x600, so the alignment condition fails. `ResolveTexture` already binds a null texture when the base field is 0, and for a heap texture that is not mapped. ## Change - `RenderContext::IsAnyMapped` (any byte of the range mapped). `ResolveTexture` binds a null texture when a non-heap texture with a size has no mapped byte. A texture with at least one mapped byte takes the existing path. - Callers that use the binding's image now handle a null binding: `RebindImages` skips a re-resolve that returns null, `TryConsumeComputeFill` declines the fill, and `ProcessPssr` exits on a missing PSSR image. ## Test `--unmapped-texture-only` (new CTest `unmapped_texture`): - the reporter's T#: binds null and registers no image. With the new check removed it stops with the reporter's message at `descriptors.cpp:623`. - a texture with half of its 64 KiB mapped still resolves with an image. With `IsAnyMapped` changed to require the whole range, this case fails. `--compute-meta-clear-only` gets a stencil fill whose destination is unmapped; the fill is declined. Windows 11, RX 9070 XT, clang-cl. The compute test cases need the robust-buffer harness change of #2038 on this GPU. Fork CI [run 44538705191](https://github.com/Nawid3333/KytyPS5/actions/runs/44538705191): Windows passes (the CI runners have no GPU, so the GPU tests run only locally); Linux and macOS fail only in `VirtualMemoryAllocationTests` (`AmmRemapIntoPrt failed: submit AMM commands returned 0x80020016`), which fails the same way on main 5ad27cdd1. ## Game @⁠Crispy81 ran a fork build with this change (#2385): Uncharted 4: A Thief's End now gets past this stop and runs until a different texture cache stop (`unresolvable equal-address image overlap`), handled separately. Written with Claude Code (AI): Claude Code found the cause from the tester's log line, wrote the change and the tests, and ran them.
Uncharted: Legacy of Thieves Collection (#2385) binds a T# at 0x600, which is never mapped, and stopped at the texture alignment check. PS5 cannot read such a texture, and an unmapped image heap texture is already bound as null. The compute image fill, PSSR and the rebind of a released image now handle a binding without an image.

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]>
A texture bound while none of its memory is mapped resolves to null.
Once the memory is mapped, the next bind of the same descriptor must
resolve the real image rather than reuse the null result.

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

@⁠coderabbitai[bot] on GitHub · 2026-11-19 15:07 UTC · original · edited 2026-11-23 23:46 UTC

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Texture resolution now checks whether nonempty texture ranges contain mapped bytes and returns an empty binding when none are mapped. Renderer paths stop processing bindings without an image ID. Compute tests cover fully unmapped and partially mapped textures and an unmapped stencil-image case. A new command-line option and CTest entry run the unmapped-texture check.

Suggested reviewers: nmzik, shadowbeat070

Change: Bug fix

Merge Risk: Minimal · up to edea7

This change makes the renderer bind a null texture when no byte in its range is mapped, instead of stopping the game. The consumers that use the binding's image now handle a null result. No merge-blocking risk was found in the supplied evidence.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: binding a texture that has no mapped bytes as a null binding. It also names the affected game. The raw summary and objectives confirm that ResolveTexture now returns a…
Description check Passed The description states the reported crash, the diagnostic texture details, the cause (no mapped bytes at the base address, failing the alignment check), and the change to ResolveTexture, IsAnyMapped, …
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: binding a texture that has no mapped bytes as a null binding. It also names the affected game. The raw summary and objectives confirm that ResolveTexture now returns a null binding for unmapped non-heap textures, with matching caller updates and tests.

Full details: Description check

Explanation

The description states the reported crash, the diagnostic texture details, the cause (no mapped bytes at the base address, failing the alignment check), and the change to ResolveTexture, IsAnyMapped, and the caller updates. It also lists the new tests and the CI results. This matches the summaries and objectives.

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 3c8a1818c7 and edea795b58.

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-19 15:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409#issuecomment-7013025576) · edited 2026-11-23 23:46 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/2409?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> Texture resolution now checks whether nonempty texture ranges contain mapped bytes and returns an empty binding when none are mapped. Renderer paths stop processing bindings without an image ID. Compute tests cover fully unmapped and partially mapped textures and an unmapped stencil-image case. A new command-line option and CTest entry run the unmapped-texture check. **Suggested reviewers:** `nmzik`, `shadowbeat070` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"edea795b58146ea724eac7d2a8d0d34335735d75" --> <!-- 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>edea7</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `edea7` --> <!-- final_review_risk_coverage:{"sourceCommitId":"edea795b58146ea724eac7d2a8d0d34335735d75","coveredCommitId":"edea795b58146ea724eac7d2a8d0d34335735d75","kind":"reviewed"} --> This change makes the renderer bind a null texture when no byte in its range is mapped, instead of stopping the game. The consumers that use the binding's image now handle a null result. No merge-blocking risk was found in the supplied evidence. <!-- 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: binding a texture that has no mapped bytes as a null binding. It also names the affected game. The raw summary and objectives confirm that ResolveTexture now returns a… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description states the reported crash, the diagnostic texture details, the cause (no mapped bytes at the base address, failing the alignment check), and the change to ResolveTexture, IsAnyMapped, … | | 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: binding a texture that has no mapped bytes as a null binding. It also names the affected game. The raw summary and objectives confirm that ResolveTexture now returns a null binding for unmapped non-heap textures, with matching caller updates and tests. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description states the reported crash, the diagnostic texture details, the cause (no mapped bytes at the base address, failing the alignment check), and the change to ResolveTexture, IsAnyMapped, and the caller updates. It also lists the new tests and the CI results. This matches the summaries and objectives. </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=2409)! 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/4e90654506c8078649e2c1d22c763164406497da/.coderabbit.yaml>) - **Commit**: [4e90654](<https://github.com/KytyPS5/KytyPS5/commit/4e90654506c8078649e2c1d22c763164406497da>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `f9e1e889-53d6-4973-a536-611127d3f419` </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 3c8a1818c7992150657c5ec8ee490fca795ea650 and edea795b58146ea724eac7d2a8d0d34335735d75. </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 -->
@ -134,6 +134,7 @@ void RenderExecutor::ProcessPssr(CommandBuffer& buffer, const Pssr::Request& req
std::copy_n(words, 8, value.dwords.begin());
value.dword_count = 8;
auto binding = ResolveTexture(resource, value);
EXIT_IF(!binding.image_id);
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-19 15:07 UTC · original · edited 2026-11-19 15:30 UTC

Major · Stability & Availability · Quick win

Handle missing PSSR images without terminating.

If a PSSR texture has no mapped bytes, ResolveTexture returns an empty binding. EXIT_IF terminates non-final builds; in KYTY_FINAL builds it compiles out, and acquire later passes the invalid ID to GetImage.

Return from ProcessPssr safely instead. Reset any images already bound before the failure.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-19 15:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409#discussion_r4630639839) · edited 2026-11-19 15:30 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** · **Quick win** **Handle missing PSSR images without terminating.** If a PSSR texture has no mapped bytes, `ResolveTexture` returns an empty binding. `EXIT_IF` terminates non-final builds; in `KYTY_FINAL` builds it compiles out, and `acquire` later passes the invalid ID to `GetImage`. Return from `ProcessPssr` safely instead. Reset any images already bound before the failure. <!-- fingerprinting:phantom:triton:okapi --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:4e941e762a640d8112f248f7 --> <!-- This is an auto-generated reply by CodeRabbit -->
Author
Owner

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5ad27cdd1a and ae87cb58da.

Files selected for processing: 7

  • CMakeLists.txt
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • src/graphics/host_gpu/renderer/renderCompute.cpp
  • src/graphics/host_gpu/renderer/renderContext.cpp
  • src/graphics/host_gpu/renderer/renderContext.h
  • src/graphics/host_gpu/renderer/renderPssr.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-19 15:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409#pullrequestreview-5977570082) · **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/5ad27cdd1aeb48a7885b1a71d5a8321590b31ecd/.coderabbit.yaml>) - **Commit**: [5ad27cd](<https://github.com/KytyPS5/KytyPS5/commit/5ad27cdd1aeb48a7885b1a71d5a8321590b31ecd>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `36459105-0d8f-46d5-8310-ef4bc57fb0ab` </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 5ad27cdd1aeb48a7885b1a71d5a8321590b31ecd and ae87cb58daf62afc797bf1be79a7a2a89dba8982. </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: 7</summary> <dl> <dd> <br> * `CMakeLists.txt` * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `src/graphics/host_gpu/renderer/renderCompute.cpp` * `src/graphics/host_gpu/renderer/renderContext.cpp` * `src/graphics/host_gpu/renderer/renderContext.h` * `src/graphics/host_gpu/renderer/renderPssr.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=4a99c643-f90f-4be9-b183-d2899814117b attempt=104ba566-1466-49bc-bf0e-362a313fe498 batch=1/1 -->
@ -134,6 +134,7 @@ void RenderExecutor::ProcessPssr(CommandBuffer& buffer, const Pssr::Request& req
std::copy_n(words, 8, value.dwords.begin());
value.dword_count = 8;
auto binding = ResolveTexture(resource, value);
EXIT_IF(!binding.image_id);
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-19 15:30 UTC · original

@⁠coderabbitai KYTY_FINAL comes only from #cmakedefine KYTY_FINAL in src/cmake_config.h.in, and no CMake file or CI workflow sets it, so EXIT_IF stops every build that is built today. ProcessPssr checks its other preconditions the same way (the descriptor shape, the request size, the input/output overlap, depth and sample counts). Returning early instead would leave the output image unwritten with no message, and no game has reached PSSR with an unmapped image yet; until one does, a stop that names the line is the more useful result.

**@⁠Nawid3333** on GitHub · 2026-11-19 15:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409#discussion_r4630952302) @⁠coderabbitai `KYTY_FINAL` comes only from `#cmakedefine KYTY_FINAL` in `src/cmake_config.h.in`, and no CMake file or CI workflow sets it, so `EXIT_IF` stops every build that is built today. `ProcessPssr` checks its other preconditions the same way (the descriptor shape, the request size, the input/output overlap, depth and sample counts). Returning early instead would leave the output image unwritten with no message, and no game has reached PSSR with an unmapped image yet; until one does, a stop that names the line is the more useful result.
@ -134,6 +134,7 @@ void RenderExecutor::ProcessPssr(CommandBuffer& buffer, const Pssr::Request& req
std::copy_n(words, 8, value.dwords.begin());
value.dword_count = 8;
auto binding = ResolveTexture(resource, value);
EXIT_IF(!binding.image_id);
Author
Owner

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

Analysis chain

Script executed:

#!/bin/bash
printf '%s\n' '--- Repository guidance files ---'
fd -H -t f '^(AGENTS\.md|CLAUDE\.md|\.coderabbit\.yaml|\.coderabbit\.yml)$' -E .git -E build -E node_modules .
printf '%s\n' '--- KYTY_FINAL references, including hidden configuration ---'
rg -n -uuu -g '!.git/**' -g '!build/**' -g '!node_modules/**' -C 3 '\bKYTY_FINAL\b' . || true
printf '%s\n' '--- EXIT_IF definitions ---'
rg -n -uuu -g '!.git/**' -g '!build/**' -g '!node_modules/**' -C 5 '^\s*#\s*define\s+EXIT_IF\b' . || true
printf '%s\n' '--- Existing repository agent guidance ---'
for f in AGENTS.md src/AGENTS.md src/graphics/AGENTS.md src/graphics/host_gpu/AGENTS.md src/graphics/host_gpu/renderer/AGENTS.md; do
  if [ -f "$f" ]; then printf '\n--- %s ---\n' "$f"; cat -n "$f"; fi
done

Length of output: 2638


Script executed:

#!/bin/bash
cat -n .coderabbit.yaml

Length of output: 1401


@Nawid3333 Thanks for the context. I withdraw the request to return early. ProcessPssr uses EXIT_IF for other invalid requests, and a silent return would leave the output unwritten.

I found no repository configuration that sets KYTY_FINAL. My concern about the guard compiling out applies if that setting is enabled.


📝 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-19 15:32 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2409#discussion_r4630970515) <!-- coderabbit-ai-generated:v1 --> <details> <summary>Analysis chain</summary> <dl> <dd> <br> Script executed: ```shell #!/bin/bash printf '%s\n' '--- Repository guidance files ---' fd -H -t f '^(AGENTS\.md|CLAUDE\.md|\.coderabbit\.yaml|\.coderabbit\.yml)$' -E .git -E build -E node_modules . printf '%s\n' '--- KYTY_FINAL references, including hidden configuration ---' rg -n -uuu -g '!.git/**' -g '!build/**' -g '!node_modules/**' -C 3 '\bKYTY_FINAL\b' . || true printf '%s\n' '--- EXIT_IF definitions ---' rg -n -uuu -g '!.git/**' -g '!build/**' -g '!node_modules/**' -C 5 '^\s*#\s*define\s+EXIT_IF\b' . || true printf '%s\n' '--- Existing repository agent guidance ---' for f in AGENTS.md src/AGENTS.md src/graphics/AGENTS.md src/graphics/host_gpu/AGENTS.md src/graphics/host_gpu/renderer/AGENTS.md; do if [ -f "$f" ]; then printf '\n--- %s ---\n' "$f"; cat -n "$f"; fi done ``` Length of output: 2638 --- Script executed: ```shell #!/bin/bash cat -n .coderabbit.yaml ``` Length of output: 1401 --- </dd> </dl> </details> `@Nawid3333` Thanks for the context. I withdraw the request to return early. `ProcessPssr` uses `EXIT_IF` for other invalid requests, and a silent return would leave the output unwritten. I found no repository configuration that sets `KYTY_FINAL`. My concern about the guard compiling out applies if that setting is enabled. --- > 📝 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 -->
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/2409/head:github-bot/gh-2409'
git switch 'github-bot/gh-2409'

Merge

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