graphics: support stencil-only targets in TopSpin 2K25 #1879

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

@⁠spicchio72 on GitHub · 2026-10-24 14:16 UTC · original
spicchio72:codex/stencil-only-topspin → main · +490 −233 · 9 files · 4 commits · draft

Summary

Support a restricted, uncompressed stencil-only guest attachment with a native VK_FORMAT_S8_UINT image, rather than requiring a depth address or dropping the attachment.

TopSpin 2K25 (PPSA06899) supplied the observed state: invalid/absent Z format, S8 stencil enabled, depth testing/writes/bounds disabled, null Z read/write addresses, valid matching stencil addresses, and a 3840 x 2160 extent. The existing path rejects its null depth address before it can represent a stencil-only attachment.

Changes

  • Build the image and view from the stencil address and one-byte guest footprint, with no invented depth plane.
  • Keep depth/stencil image usage, copy aspects, alias handling and read layouts correct for native S8.
  • Preserve rejection of unsupported configurations, including multisampling, HTile, nonzero mips, depth operations, unsupported view/extent state and missing S8 host support.
  • Add the stencil_only_target GPU regression test: discovery, stencil-only attachment acquisition, upload, clear/readback, R8 sampled alias, separate storage backing and round trip, plus the observed 4K footprint.

Scope and limitations

This addresses the initial stencil-only depth-target rejection reported in #1778. It does not establish that TopSpin 2K25 is stable or renders correctly overall; later guest access violations and separate image-conversion issues remain out of scope. Do not close the compatibility issue on this evidence alone.

The D16-to-wide-depth conversion, block-compressed view fixes, TLS/memory diagnostics and Astro Bot work are deliberately excluded.

Verification

Game evidence and incremental results: #1778 . Only the language/start-screen images there are stencil-only results. The gameplay image includes separate D16 and BC changes and is not evidence for this PR alone. This PR relates to #1778; it does not close it.

Patch isolated against upstream 8291cfeb04237a5e36f5d377e620cd0e6acd5805. Isolated Windows Release compilation passes. stencil_only_target passes with VK_LAYER_KHRONOS_validation loaded; the loader confirms instance and device layer insertion. Disabling just the new stencil-only dispatch reproduces the original unsupported depth register state, and restoring it passes again. image_transfer_layout and texture_cache_depth_readback also pass.

The complete suite is not claimed green: texture_cache_image_views and texture_cache_storage_sampled stop at unsupported D24S8 image usage (format=129, usage 0x23) on this host. This was not reproduced on a completely unmodified build, so it must not be dismissed as a proven pre-existing failure. Rasterization cases are unavailable in the harness on the selected device; this test verifies attachment setup and data movement, not a complete stencil-tested draw. See verification.md for the exact scope and remaining review work.

Submission preparation

The local submission checkout was formatted with the repository-pinned clang-format 22.1.3 and src/.clang-format. Whole-file formatting also changes pre-existing formatting in the seven touched source files. Each formatted source was checked against formatter output on the original isolated candidate; no extra functional delta was found. Final emulator/test compilation passes using a hash-matched isolated verification source. The three focused tests listed above pass again with the validation-layer environment variable set. Fetch confirms upstream main still matches the recorded base. See formatting-review.md; this preparation is not a claim of completed human code review or complete regression coverage.

AI assistance

Prepared with OpenAI Codex assistance and reviewed by me. Only the locally performed checks documented in the verification record are claimed; full game compatibility is not claimed.

**@⁠spicchio72** on GitHub · 2026-10-24 14:16 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1879) `spicchio72:codex/stencil-only-topspin` → `main` · +490 −233 · 9 files · 4 commits · draft Summary Support a restricted, uncompressed stencil-only guest attachment with a native `VK_FORMAT_S8_UINT` image, rather than requiring a depth address or dropping the attachment. TopSpin 2K25 (PPSA06899) supplied the observed state: invalid/absent Z format, S8 stencil enabled, depth testing/writes/bounds disabled, null Z read/write addresses, valid matching stencil addresses, and a 3840 x 2160 extent. The existing path rejects its null depth address before it can represent a stencil-only attachment. ## Changes - Build the image and view from the stencil address and one-byte guest footprint, with no invented depth plane. - Keep depth/stencil image usage, copy aspects, alias handling and read layouts correct for native S8. - Preserve rejection of unsupported configurations, including multisampling, HTile, nonzero mips, depth operations, unsupported view/extent state and missing S8 host support. - Add the `stencil_only_target` GPU regression test: discovery, stencil-only attachment acquisition, upload, clear/readback, R8 sampled alias, separate storage backing and round trip, plus the observed 4K footprint. ## Scope and limitations This addresses the initial stencil-only depth-target rejection reported in #1778. It does **not** establish that TopSpin 2K25 is stable or renders correctly overall; later guest access violations and separate image-conversion issues remain out of scope. Do not close the compatibility issue on this evidence alone. The D16-to-wide-depth conversion, block-compressed view fixes, TLS/memory diagnostics and Astro Bot work are deliberately excluded. ## Verification Game evidence and incremental results: https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/1778 . Only the language/start-screen images there are stencil-only results. The gameplay image includes separate D16 and BC changes and is not evidence for this PR alone. This PR relates to #1778; it does not close it. Patch isolated against upstream `8291cfeb04237a5e36f5d377e620cd0e6acd5805`. Isolated Windows Release compilation passes. `stencil_only_target` passes with `VK_LAYER_KHRONOS_validation` loaded; the loader confirms instance and device layer insertion. Disabling just the new stencil-only dispatch reproduces the original `unsupported depth register state`, and restoring it passes again. `image_transfer_layout` and `texture_cache_depth_readback` also pass. The complete suite is **not** claimed green: `texture_cache_image_views` and `texture_cache_storage_sampled` stop at unsupported D24S8 image usage (`format=129`, usage `0x23`) on this host. This was not reproduced on a completely unmodified build, so it must not be dismissed as a proven pre-existing failure. Rasterization cases are unavailable in the harness on the selected device; this test verifies attachment setup and data movement, not a complete stencil-tested draw. See `verification.md` for the exact scope and remaining review work. ## Submission preparation The local submission checkout was formatted with the repository-pinned clang-format 22.1.3 and `src/.clang-format`. Whole-file formatting also changes pre-existing formatting in the seven touched source files. Each formatted source was checked against formatter output on the original isolated candidate; no extra functional delta was found. Final emulator/test compilation passes using a hash-matched isolated verification source. The three focused tests listed above pass again with the validation-layer environment variable set. Fetch confirms upstream main still matches the recorded base. See `formatting-review.md`; this preparation is not a claim of completed human code review or complete regression coverage. ## AI assistance Prepared with OpenAI Codex assistance and reviewed by me. Only the locally performed checks documented in the verification record are claimed; full game compatibility is not claimed.
Represent supported single-sample stencil-only attachments as native S8 images while preserving unsupported-state guards. Add focused setup, transfer, clear/readback and alias regression coverage.

AI-assisted implementation prepared with OpenAI Codex. Windows Release compilation and focused tests pass; Linux and full stencil rasterization coverage remain unverified.
Return CTest skip code 77 when single-sample S8 attachment usage is unsupported, without hiding other Vulkan query failures. Verify a distinct GPU-written R8 alias value after stencil rediscovery. AI-assisted; isolated Windows build and four focused tests pass with validation requested.
Adapt native S8 handling to the current renderer while preserving HTile and depth mip behavior. AI-assisted integration. Windows Release build and five focused tests passed with Vulkan validation on RTX 5090.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:07:50 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-24 14:23 UTC · original

Review in Change Stack →

Walkthrough

The changes add support for stencil-only S8 depth targets. They validate target state, format, extent, backing range, and host attachment support, then extend image and descriptor handling for stencil aspects. A new host test checks target discovery, attachment state, upload and readback, aliases, and a 4K footprint. A CTest case runs the test through the --stencil-only selector.

Suggested reviewers: nmzik

Priority: Normal

Change: Feature

Merge Risk: Low · up to e0442

Hosts without optional S8 support cannot complete the new GPU test, and its storage round-trip check leaves a regression undetected. These are bounded test concerns to address or explicitly accept before merging.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 7 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding support for stencil-only targets in the graphics subsystem.
Description check Passed The description directly explains the stencil-only target implementation, supported and rejected configurations, regression coverage, verification results, and scope limitations.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 7 files. (2 skipped: 1 unsupported, 1 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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-24 14:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1879#issuecomment-6385352675) <!-- 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/1879?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 --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> The changes add support for stencil-only S8 depth targets. They validate target state, format, extent, backing range, and host attachment support, then extend image and descriptor handling for stencil aspects. A new host test checks target discovery, attachment state, upload and readback, aliases, and a 4K footprint. A CTest case runs the test through the `--stencil-only` selector. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <strong>Priority: <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/priority-normal-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Normal</strong> <!-- change_assessment_commit:"e0442deac1ee486344afef95817702b9f2fda5e1" --> **Change:** Feature <!-- 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>e0442</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `e0442` --> <!-- final_review_risk_coverage:{"sourceCommitId":"e0442deac1ee486344afef95817702b9f2fda5e1","coveredCommitId":"e0442deac1ee486344afef95817702b9f2fda5e1","kind":"reviewed"} --> Hosts without optional S8 support cannot complete the new GPU test, and its storage round-trip check leaves a regression undetected. These are bounded test concerns to address or explicitly accept before merging. <!-- 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-inconclusive-14-v2.svg" width="14" height="14" align="middle" alt="Inconclusive" title="Inconclusive"></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 inconclusive</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 7 files. (2 skipped: … | 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 | | :------------------------ | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely describes the main change: adding support for stencil-only targets in the graphics subsystem. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the stencil-only target implementation, supported and rejected configurations, regression coverage, verification results, and scope limitations. | | 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> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 7 files. (2 skipped: 1 unsupported, 1 too large.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </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=1879)! 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 -->
@ -15251,0 +15297,4 @@
registers.SetStencilMask({});
RenderDepthInfo stencil{};
RenderExecutorTestAccess::ResolveRenderDepthTarget(
executor, scheduler.Current(), stencil);
Author
Owner

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

Minor · Stability & Availability · Quick win

🔎 Supported by static analysis

Script executed:

sed -n '14214,14295p' tests/ShaderRecompilerComputeTests.cpp
sed -n '130,205p' src/graphics/host_gpu/renderer/depthRenderTarget.cpp
sed -n '718,730p' CMakeLists.txt
rg -n 'SKIP|Skip|skip|imageFormatProperties|ImageFormatProperties' tests/ShaderRecompilerComputeTests.cpp | head -70

Repository: KytyPS5/KytyPS5

Length of output: 14064


Script executed:

set -o pipefail
rg -n -F --glob 'tests/ShaderRecompilerComputeTests.cpp' \
  -e '--stencil-only' \
  -e 'CheckStencilOnlyTarget' \
  -e 'GetImageFormatProperties(' \
  -e 'getImageFormatProperties' \
  -e 'DepthFatal' \
  -e 'm_skipped_cases' \
  -e 'SkipRasterizationCases' \
  -e 'will be skipped' \
  tests/ShaderRecompilerComputeTests.cpp src/graphics/host_gpu/renderer/depthRenderTarget.cpp
printf '\n--- selector and adjacent main ---\n'
sed -n '51340,51440p' tests/ShaderRecompilerComputeTests.cpp
printf '\n--- image-format checks in harness ---\n'
sed -n '21290,21335p' tests/ShaderRecompilerComputeTests.cpp
printf '\n--- existing unsupported-format handling ---\n'
sed -n '22090,22165p' tests/ShaderRecompilerComputeTests.cpp
printf '\n--- fatal definition/call context ---\n'
rg -n -F --glob '*.{cpp,h,hpp}' -e 'void DepthFatal' -e 'DepthFatal(' src/graphics/host_gpu | head -80

Repository: KytyPS5/KytyPS5

Length of output: 16921


Script executed:

set -o pipefail
printf '%s\n' '--- fatal implementation ---'
sed -n '20,45p' src/graphics/host_gpu/renderer/depthRenderTarget.cpp
printf '%s\n' '--- exact stencil selector ---'
sed -n '51215,51250p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- test result/reporting and skip count ---'
rg -n -F --glob 'tests/ShaderRecompilerComputeTests.cpp' \
  -e 'SkippedCaseCount()' \
  -e 'skipped_device_checks' \
  -e 'm_skipped_cases' \
  -e 'return skipped' \
  -e 'unsupported' \
  -e 'getImageFormatProperties' \
  -e 'GetImageFormatProperties' \
  -e 'RasterizationSupported()' \
  tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- all test-side Vulkan format capability queries in relevant files ---'
rg -n -F --glob '*.{cpp,h,hpp}' \
  -e 'getImageFormatProperties' \
  -e 'GetImageFormatProperties' \
  -e 'ImageFormatProperties' \
  tests src/graphics/host_gpu | head -160

Repository: KytyPS5/KytyPS5

Length of output: 5016


Skip stencil_only_target when S8 attachment usage is unsupported.

If the host rejects the VK_FORMAT_S8_UINT image-usage query, return a successful skip before calling ResolveRenderDepthTarget. MakeStencilTargetDesc currently calls DepthFatal, so the unconditionally registered CTest fails on valid Vulkan hosts without this optional format. This is an isolated test-workflow failure, so minor severity is proportionate.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-24 14:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1879#discussion_r4367405832) <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Stability & Availability** · **Quick win** <details> <summary>🔎 Supported by static analysis</summary> <dl> <dd> Script executed: ```bash sed -n '14214,14295p' tests/ShaderRecompilerComputeTests.cpp sed -n '130,205p' src/graphics/host_gpu/renderer/depthRenderTarget.cpp sed -n '718,730p' CMakeLists.txt rg -n 'SKIP|Skip|skip|imageFormatProperties|ImageFormatProperties' tests/ShaderRecompilerComputeTests.cpp | head -70 ``` Repository: KytyPS5/KytyPS5 Length of output: 14064 --- Script executed: ```bash set -o pipefail rg -n -F --glob 'tests/ShaderRecompilerComputeTests.cpp' \ -e '--stencil-only' \ -e 'CheckStencilOnlyTarget' \ -e 'GetImageFormatProperties(' \ -e 'getImageFormatProperties' \ -e 'DepthFatal' \ -e 'm_skipped_cases' \ -e 'SkipRasterizationCases' \ -e 'will be skipped' \ tests/ShaderRecompilerComputeTests.cpp src/graphics/host_gpu/renderer/depthRenderTarget.cpp printf '\n--- selector and adjacent main ---\n' sed -n '51340,51440p' tests/ShaderRecompilerComputeTests.cpp printf '\n--- image-format checks in harness ---\n' sed -n '21290,21335p' tests/ShaderRecompilerComputeTests.cpp printf '\n--- existing unsupported-format handling ---\n' sed -n '22090,22165p' tests/ShaderRecompilerComputeTests.cpp printf '\n--- fatal definition/call context ---\n' rg -n -F --glob '*.{cpp,h,hpp}' -e 'void DepthFatal' -e 'DepthFatal(' src/graphics/host_gpu | head -80 ``` Repository: KytyPS5/KytyPS5 Length of output: 16921 --- Script executed: ```bash set -o pipefail printf '%s\n' '--- fatal implementation ---' sed -n '20,45p' src/graphics/host_gpu/renderer/depthRenderTarget.cpp printf '%s\n' '--- exact stencil selector ---' sed -n '51215,51250p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- test result/reporting and skip count ---' rg -n -F --glob 'tests/ShaderRecompilerComputeTests.cpp' \ -e 'SkippedCaseCount()' \ -e 'skipped_device_checks' \ -e 'm_skipped_cases' \ -e 'return skipped' \ -e 'unsupported' \ -e 'getImageFormatProperties' \ -e 'GetImageFormatProperties' \ -e 'RasterizationSupported()' \ tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- all test-side Vulkan format capability queries in relevant files ---' rg -n -F --glob '*.{cpp,h,hpp}' \ -e 'getImageFormatProperties' \ -e 'GetImageFormatProperties' \ -e 'ImageFormatProperties' \ tests src/graphics/host_gpu | head -160 ``` Repository: KytyPS5/KytyPS5 Length of output: 5016 --- </dd> </dl> </details> **Skip `stencil_only_target` when S8 attachment usage is unsupported.** If the host rejects the `VK_FORMAT_S8_UINT` image-usage query, return a successful skip before calling `ResolveRenderDepthTarget`. `MakeStencilTargetDesc` currently calls `DepthFatal`, so the unconditionally registered CTest fails on valid Vulkan hosts without this optional format. This is an isolated test-workflow failure, so minor severity is proportionate. <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:b1ddc3da3454d804a23f4a56 --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

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

Actionable comments posted: 1

🧹 Nitpick comments: 1
tests/ShaderRecompilerComputeTests.cpp: 1

14324-14325: Trivial · Functional Correctness · Quick win

Assert a value written through the storage alias.

The guest range already contains 0x7a before alias creation. The current checks validate alias identity and readback, then compare that unchanged value. A storage alias that fails to preserve the GPU contents can therefore pass. Clear storage_id to a distinct value on the GPU and assert that value after stencil rediscovery.

Suggested test adjustment
       Require(name, "storage alias", storage_id != sampled_id &&
           cache.FindTexture(storage_id, storage) != nullptr,
           "an R8 storage alias did not convert the S8 backing");
+      vk::ClearValue storage_clear{};
+      storage_clear.color.uint32 = std::array{0xc3u, 0u, 0u, 0u};
+      TextureCacheTestAccess::ClearImage(cache, scheduler.Current(), storage_id,
+          {vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1}, storage_clear);
       RenderDepthInfo restored{};
...
       Require(name, "storage round trip contents", std::all_of(bytes, bytes + alignment,
-          [](uint8_t value) { return value == 0x7a; }),
+          [](uint8_t value) { return value == 0xc3; }),
           "storage alias conversion lost stencil contents");

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 8291cfeb04 and e0442deac1.

Files selected for processing: 9
  • CMakeLists.txt
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/depthRenderTarget.cpp
  • src/graphics/host_gpu/renderer/image/image.cpp
  • src/graphics/host_gpu/renderer/image/image.h
  • src/graphics/host_gpu/renderer/image/imageInfo.h
  • src/graphics/host_gpu/renderer/image/imageView.cpp
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • tests/ShaderRecompilerComputeTests.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-10-24 14:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1879#pullrequestreview-5638583602) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** <details> <summary>🧹 Nitpick comments: 1</summary><blockquote> <dl> <dd> <details> <summary>tests/ShaderRecompilerComputeTests.cpp: 1</summary><blockquote> <dl> <dd> `14324-14325`: **<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** · **Functional Correctness** · **Quick win** **Assert a value written through the storage alias.** The guest range already contains `0x7a` before alias creation. The current checks validate alias identity and readback, then compare that unchanged value. A storage alias that fails to preserve the GPU contents can therefore pass. Clear `storage_id` to a distinct value on the GPU and assert that value after stencil rediscovery. <details> <summary>Suggested test adjustment</summary> <dl> <dd> ```diff Require(name, "storage alias", storage_id != sampled_id && cache.FindTexture(storage_id, storage) != nullptr, "an R8 storage alias did not convert the S8 backing"); + vk::ClearValue storage_clear{}; + storage_clear.color.uint32 = std::array{0xc3u, 0u, 0u, 0u}; + TextureCacheTestAccess::ClearImage(cache, scheduler.Current(), storage_id, + {vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1}, storage_clear); RenderDepthInfo restored{}; ... Require(name, "storage round trip contents", std::all_of(bytes, bytes + alignment, - [](uint8_t value) { return value == 0x7a; }), + [](uint8_t value) { return value == 0xc3; }), "storage alias conversion lost stencil contents"); ``` </dd> </dl> </details> <!-- cr-comment:v1:256a20cb56bbdad7a011d3fb --> </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <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> - **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/8291cfeb04237a5e36f5d377e620cd0e6acd5805/.coderabbit.yaml>) - **Commit**: [8291cfe](<https://github.com/KytyPS5/KytyPS5/commit/8291cfeb04237a5e36f5d377e620cd0e6acd5805>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `ea54ae30-ed8f-4c13-8054-0b125a90d874` </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> Reviewing files that changed from the base of the PR and between 8291cfeb04237a5e36f5d377e620cd0e6acd5805 and e0442deac1ee486344afef95817702b9f2fda5e1. </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: 9</summary> <dl> <dd> * `CMakeLists.txt` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/depthRenderTarget.cpp` * `src/graphics/host_gpu/renderer/image/image.cpp` * `src/graphics/host_gpu/renderer/image/image.h` * `src/graphics/host_gpu/renderer/image/imageInfo.h` * `src/graphics/host_gpu/renderer/image/imageView.cpp` * `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 8 included reviews per hour; 7 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=3e4ed0d0-f6c0-46f5-8eb8-cdc2dfe7a193 attempt=d5ad182c-9c78-46e9-9aa1-9cbd66f89ef0 batch=1/1 -->
This pull request has changes conflicting with the target branch.
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/depthRenderTarget.cpp
  • src/graphics/host_gpu/renderer/image/image.cpp
  • src/graphics/host_gpu/renderer/image/image.h
  • src/graphics/host_gpu/renderer/image/imageInfo.h
  • src/graphics/host_gpu/renderer/image/imageView.cpp
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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