tests: resolve the host depth-stencil format against device support #1811

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

@⁠theantipopau on GitHub · 2026-10-22 03:23 UTC · original
theantipopau:depth-stencil-device-format → main · +82 −28 · 1 files · 2 commits · closed without merging

Continuation of #930, which GitHub refuses to reopen after the branch was rebased (the reopen call returns reopenPullRequest: Could not open the pull request). Same change, rebased onto main at 7b7f9a70.

Problem

Four fixtures build depth-stencil images with vk::Format::eD24UnormS8Uint hardcoded. RADV on GFX1200 does not support that format for depth-stencil attachment + sampled + transfer usage, and Image::Image exits the process (image format does not support required usage, src/graphics/host_gpu/renderer/image/image.cpp) instead of failing the case. On that device the suite therefore aborts rather than reporting a result.

Reported with retest data by @⁠MuteRex in #930: main ran 12 failed / 57 cases on an RX 9060 XT; with this change 6 of those pass and the D24S8 aborts are gone.

Change

  • VulkanHarness::SupportedDepthStencilFormat probes the device with vkGetImageFormatProperties using the exact usage the fixtures need, preferring D24S8, then D32S8, then D16S8, and returns eUndefined if none is usable.
  • The depth-stencil aspect fixture, the unified texture cache fixture, its sample-count-2 depth target, and the D16 fallback image use the resolved format.
  • When no format is available the affected fixture skips its case through the existing SkipRasterizationCases path rather than aborting the run.

Test-only; no emulator behavior changes.

Verification

  • The diff applies cleanly to main at 7b7f9a70 and touches only tests/ShaderRecompilerComputeTests.cpp.
  • The three call sites are in scope (CheckUnifiedImageViewCache, and twice in CheckUnifiedTextureCacheFlow); the API and SkipRasterizationCases signatures match current main.
  • I could not run the suite here: this host has no Vulkan device available to the test harness, and I have no RADV/GFX1200 hardware. The device-specific behavior is exactly what @⁠MuteRex measured on their RX 9060 XT.
**@⁠theantipopau** on GitHub · 2026-10-22 03:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811) `theantipopau:depth-stencil-device-format` → `main` · +82 −28 · 1 files · 2 commits · closed without merging Continuation of #930, which GitHub refuses to reopen after the branch was rebased (the reopen call returns `reopenPullRequest: Could not open the pull request`). Same change, rebased onto `main` at 7b7f9a70. ## Problem Four fixtures build depth-stencil images with `vk::Format::eD24UnormS8Uint` hardcoded. RADV on GFX1200 does not support that format for depth-stencil attachment + sampled + transfer usage, and `Image::Image` exits the process (`image format does not support required usage`, `src/graphics/host_gpu/renderer/image/image.cpp`) instead of failing the case. On that device the suite therefore aborts rather than reporting a result. Reported with retest data by @⁠MuteRex in #930: `main` ran 12 failed / 57 cases on an RX 9060 XT; with this change 6 of those pass and the D24S8 aborts are gone. ## Change - `VulkanHarness::SupportedDepthStencilFormat` probes the device with `vkGetImageFormatProperties` using the exact usage the fixtures need, preferring D24S8, then D32S8, then D16S8, and returns `eUndefined` if none is usable. - The depth-stencil aspect fixture, the unified texture cache fixture, its sample-count-2 depth target, and the D16 fallback image use the resolved format. - When no format is available the affected fixture skips its case through the existing `SkipRasterizationCases` path rather than aborting the run. Test-only; no emulator behavior changes. ## Verification - The diff applies cleanly to `main` at 7b7f9a70 and touches only `tests/ShaderRecompilerComputeTests.cpp`. - The three call sites are in scope (`CheckUnifiedImageViewCache`, and twice in `CheckUnifiedTextureCacheFlow`); the API and `SkipRasterizationCases` signatures match current `main`. - I could not run the suite here: this host has no Vulkan device available to the test harness, and I have no RADV/GFX1200 hardware. The device-specific behavior is exactly what @⁠MuteRex measured on their RX 9060 XT.
RADV on GFX1200 rejects VK_FORMAT_D24_UNORM_S8_UINT for depth-stencil
attachment, sampled and transfer usage, and Image::Image exits rather than
create such an image, so any fixture that hardcodes the format aborts the
run. Ask vkGetImageFormatProperties for a usable format and skip the case
when the device offers none. Rebased onto current main.
ImageUsageFlags adds eAttachmentFeedbackLoopEXT for a sampled depth image when
the device enabled the feature. The probe must ask for the same usage or a
format can pass here and still exit inside Image::Image.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:06:21 +00:00
github-bot closed this pull request 2026-11-26 10:06:21 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-22 03:30 UTC · original · edited 2026-11-04 23:18 UTC

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The test harness now selects a depth-stencil format that supports the required image usage and sample count. The depth-stencil view and texture-cache tests use the selected format. When no suitable format is available, affected test cases record a skip.

Change: Bug fix

Merge Risk: Low · previous review 4cd30

On devices without a supported two-sample depth format, the test reports a skip but omits other checks that could still run. The change is mergeable with that test-coverage limitation understood.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly explains the depth-stencil format resolution, affected test fixtures, skip behavior, device-specific problem, and verification limits. It is directly related to the changeset.
Title check Passed The title clearly and concisely describes the main change: resolving the host depth-stencil format based on device support.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.)

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
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ab3eb37a-2093-4e9f-bc87-e14f9bf7bc0e
📥 Commits

Reviewing files that changed from the base of the PR and between 652e794096 and 4cd3077b32.

📒 Files selected for processing: 1
  • tests/ShaderRecompilerComputeTests.cpp
🚧 Files skipped from review as they are similar to previous changes: 1
  • tests/ShaderRecompilerComputeTests.cpp

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

**@⁠coderabbitai[bot]** on GitHub · 2026-10-22 03:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#issuecomment-6331978480) · edited 2026-11-04 23:18 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/1811?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> The test harness now selects a depth-stencil format that supports the required image usage and sample count. The depth-stencil view and texture-cache tests use the selected format. When no suitable format is available, affected test cases record a skip. </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> <!-- change_assessment_commit:"4cd3077b322efdefedb2e187212a1f86a11e308f" --> **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> · previous review <code>4cd30</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `4cd30` --> <!-- final_review_risk_coverage:{"sourceCommitId":"4cd3077b322efdefedb2e187212a1f86a11e308f","coveredCommitId":"4cd3077b322efdefedb2e187212a1f86a11e308f","kind":"reviewed"} --> On devices without a supported two-sample depth format, the test reports a skip but omits other checks that could still run. The change is mergeable with that test-coverage limitation understood. <!-- 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> 5</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 depth-stencil format resolution, affected test fixtures, skip behavior, device-specific problem, and verification limits. 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 and concisely describes the main change: resolving the host depth-stencil format based on device support. | | Docstring Coverage | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… | | 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: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.) </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=1811)! 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> <!-- tips_end --> <!-- recent_review_start --> <h6> <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**: `ab3eb37a-2093-4e9f-bc87-e14f9bf7bc0e` </dd> </dl> </details> <details> <summary><strong>📥 Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 652e794096c1cb96e7dca56f0645175e7e42fd10 and 4cd3077b322efdefedb2e187212a1f86a11e308f. </dd> </dl> </details> <details> <summary><strong>📒 Files selected for processing: 1</strong></summary> <dl> <dd> * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> <details> <summary><strong>🚧 Files skipped from review as they are similar to previous changes: 1</strong></summary> <dl> <dd> * 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; 5 remain after this review. </dd> </dl> </details> </h6> <!-- recent_review_end -->
@ -2045,0 +2064,4 @@
vk::ImageFormatProperties properties {};
if (m_runtime_context.GetImageFormatProperties(
candidate, vk::ImageType::e2D, vk::ImageTiling::eOptimal, usage,
{}, &properties) == vk::Result::eSuccess &&
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-22 03:30 UTC · original · edited 2026-10-22 03:47 UTC

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
# Inspect the constructor's query inputs and the affected fixture descriptors.
set -euo pipefail

ast-grep outline src/graphics/host_gpu/renderer/image/image.cpp \
  --match 'ImageCreateFlags|ImageUsageFlags|Image' --view expanded
rg -n -C 12 'ImageCreateFlags\(|ImageUsageFlags\(|GetImageFormatProperties\(' \
  src/graphics/host_gpu/renderer/image/image.cpp
rg -n -C 8 'SupportedDepthStencilFormat\(|depth_stencil_info|ms_depth_desc|d16_depth_desc' \
  tests/ShaderRecompilerComputeTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 22235


🏁 Script executed:

set -euo pipefail
if test -f /tmp/coderabbit-shell-logs/shell-output-g6lWBl; then
  rg -n -C 8 -F -e 'DepthAspectTransferFormat' -e 'IsBlock()' -e 'ImageUsageFlags' -e 'SupportedDepthStencilFormat' /tmp/coderabbit-shell-logs/shell-output-g6lWBl || true
fi
rg -n -C 10 -F -e 'DepthAspectTransferFormat' -e 'bool IsBlock' -e 'IsBlock() const' src tests include 2>/dev/null || true
nl -ba src/graphics/host_gpu/renderer/image/image.cpp | sed -n '33,105p'
nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '2045,2068p'

Repository: KytyPS5/KytyPS5

Length of output: 36474


🏁 Script executed:

set -euo pipefail
rg -n -C 8 -F -e 'attachment_feedback_loop_enabled' tests src/graphics
rg -n -C 12 -F -e 'depth_info' tests/ShaderRecompilerComputeTests.cpp | head -160

Repository: KytyPS5/KytyPS5

Length of output: 24492


Probe the feedback-loop usage bit.

Image::Image adds eAttachmentFeedbackLoopEXT for sampled depth images when attachment_feedback_loop_enabled is true. The test sets this field from m_rasterization_supported, but SupportedDepthStencilFormat omits the bit. A format can pass the helper query and fail the constructor query, which calls EXIT instead of skipping the case. Add the same usage bit to the probe.

Suggested fix
-    const auto usage = vk::ImageUsageFlagBits::eDepthStencilAttachment |
-                       vk::ImageUsageFlagBits::eSampled |
-                       vk::ImageUsageFlagBits::eTransferSrc |
-                       vk::ImageUsageFlagBits::eTransferDst;
+    auto usage = vk::ImageUsageFlagBits::eDepthStencilAttachment |
+                 vk::ImageUsageFlagBits::eSampled |
+                 vk::ImageUsageFlagBits::eTransferSrc |
+                 vk::ImageUsageFlagBits::eTransferDst;
+    if (m_runtime_context.attachment_feedback_loop_enabled) {
+      usage |= vk::ImageUsageFlagBits::eAttachmentFeedbackLoopEXT;
+    }

✅ Addressed in commit 4cd3077

**@⁠coderabbitai[bot]** on GitHub · 2026-10-22 03:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#discussion_r4344270657) · edited 2026-10-22 03:47 UTC <!-- coderabbit-ai-generated:v1 --> **🩺 Stability & Availability** | **🟠 Major** | **🏗️ Heavy lift** <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash #!/bin/bash # Inspect the constructor's query inputs and the affected fixture descriptors. set -euo pipefail ast-grep outline src/graphics/host_gpu/renderer/image/image.cpp \ --match 'ImageCreateFlags|ImageUsageFlags|Image' --view expanded rg -n -C 12 'ImageCreateFlags\(|ImageUsageFlags\(|GetImageFormatProperties\(' \ src/graphics/host_gpu/renderer/image/image.cpp rg -n -C 8 'SupportedDepthStencilFormat\(|depth_stencil_info|ms_depth_desc|d16_depth_desc' \ tests/ShaderRecompilerComputeTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 22235 --- 🏁 Script executed: ```bash set -euo pipefail if test -f /tmp/coderabbit-shell-logs/shell-output-g6lWBl; then rg -n -C 8 -F -e 'DepthAspectTransferFormat' -e 'IsBlock()' -e 'ImageUsageFlags' -e 'SupportedDepthStencilFormat' /tmp/coderabbit-shell-logs/shell-output-g6lWBl || true fi rg -n -C 10 -F -e 'DepthAspectTransferFormat' -e 'bool IsBlock' -e 'IsBlock() const' src tests include 2>/dev/null || true nl -ba src/graphics/host_gpu/renderer/image/image.cpp | sed -n '33,105p' nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '2045,2068p' ``` Repository: KytyPS5/KytyPS5 Length of output: 36474 --- 🏁 Script executed: ```bash set -euo pipefail rg -n -C 8 -F -e 'attachment_feedback_loop_enabled' tests src/graphics rg -n -C 12 -F -e 'depth_info' tests/ShaderRecompilerComputeTests.cpp | head -160 ``` Repository: KytyPS5/KytyPS5 Length of output: 24492 --- </details> **Probe the feedback-loop usage bit.** `Image::Image` adds `eAttachmentFeedbackLoopEXT` for sampled depth images when `attachment_feedback_loop_enabled` is true. The test sets this field from `m_rasterization_supported`, but `SupportedDepthStencilFormat` omits the bit. A format can pass the helper query and fail the constructor query, which calls `EXIT` instead of skipping the case. Add the same usage bit to the probe. <details> <summary>Suggested fix</summary> ```diff - const auto usage = vk::ImageUsageFlagBits::eDepthStencilAttachment | - vk::ImageUsageFlagBits::eSampled | - vk::ImageUsageFlagBits::eTransferSrc | - vk::ImageUsageFlagBits::eTransferDst; + auto usage = vk::ImageUsageFlagBits::eDepthStencilAttachment | + vk::ImageUsageFlagBits::eSampled | + vk::ImageUsageFlagBits::eTransferSrc | + vk::ImageUsageFlagBits::eTransferDst; + if (m_runtime_context.attachment_feedback_loop_enabled) { + usage |= vk::ImageUsageFlagBits::eAttachmentFeedbackLoopEXT; + } ``` </details> <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:6fdbb11840086d85e1fff576 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 4cd3077
@ -6811,3 +6865,3 @@
ms_depth_desc.info.samples = 2;
ms_depth_desc.info.type = Prospero::ImageType::kColor2D;
ms_depth_desc.view_info.format = vk::Format::eD24UnormS8Uint;
ms_depth_desc.view_info.format = ms_depth_format;
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-22 03:30 UTC · original

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '6810,6900p' tests/ShaderRecompilerComputeTests.cpp
rg -n 'CheckUnifiedTextureCacheFlow|SkipRasterizationCases' tests/ShaderRecompilerComputeTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 5966


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- enclosing function ---'
sed -n '5480,5665p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- skip counter and nearby invocation/consumption ---'
sed -n '2035,2080p' tests/ShaderRecompilerComputeTests.cpp
rg -n -C 8 -F -- 'm_skipped_cases' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- all function call sites with surrounding code ---'
sed -n '49755,49890p' tests/ShaderRecompilerComputeTests.cpp
sed -n '50070,50120p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- comparison diff for the implicated function ---'
git diff 7b7f9a70c652afd6ec8ea8599884d9b4b3abc9f3 -- tests/ShaderRecompilerComputeTests.cpp | sed -n '/CheckUnifiedTextureCacheFlow/,/CheckUnifiedImageViewCache/p'

Repository: KytyPS5/KytyPS5

Length of output: 20937


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- remaining CheckUnifiedTextureCacheFlow body ---'
sed -n '5660,6925p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- skip API consumers and all skip calls ---'
rg -n -C 12 -F -e 'SkippedCaseCount()' -e 'SkipRasterizationCases(' tests
printf '%s\n' '--- function boundaries and runner tail ---'
rg -n -F -e 'void CheckUnifiedTextureCacheFlow' -e 'int main' -e 'Run' tests/ShaderRecompilerComputeTests.cpp | head -80
sed -n '50090,50170p' tests/ShaderRecompilerComputeTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 41988


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- post-2x flow ---'
nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6850,6965p'
printf '%s\n' '--- later independent cache checks ---'
nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6965,7075p'
printf '%s\n' '--- enclosing function end ---'
python3 - <<'PY'
from pathlib import Path
p = Path('tests/ShaderRecompilerComputeTests.cpp')
lines = p.read_text().splitlines()
start = next(i for i, line in enumerate(lines) if 'void CheckUnifiedTextureCacheFlow()' in line)
for i in range(start + 1, len(lines)):
    if lines[i].startswith('  void ') and i > start:
        print(f'next member: {i+1}: {lines[i]}')
        break
PY

Repository: KytyPS5/KytyPS5

Length of output: 14965


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- exact continuation after the 2x case ---'
nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6880,7045p'
printf '%s\n' '--- later test labels in this function ---'
python3 - <<'PY'
from pathlib import Path
lines = Path('tests/ShaderRecompilerComputeTests.cpp').read_text().splitlines()
start = next(i for i, line in enumerate(lines) if 'void CheckUnifiedTextureCacheFlow()' in line)
for i in range(start, min(len(lines), 7600)):
    if 'Require(name,' in lines[i] or 'multisample_source' in lines[i] or '4x' in lines[i]:
        print(f'{i+1}: {lines[i].strip()}')
PY

Repository: KytyPS5/KytyPS5

Length of output: 17432


Do not return from the entire cache-flow test.

When no 2x format is supported, SkipRasterizationCases(1) records only the 2x case, but return exits CheckUnifiedTextureCacheFlow. This prevents the independent four-sample depth overlap check and later cache checks from running. Guard the 2x-dependent checks instead, then continue with the later cases and record each separately skipped case.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-22 03:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#discussion_r4344270661) <!-- coderabbit-ai-generated:v1 --> **🎯 Functional Correctness** | **🟡 Minor** | **⚡ Quick win** <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash sed -n '6810,6900p' tests/ShaderRecompilerComputeTests.cpp rg -n 'CheckUnifiedTextureCacheFlow|SkipRasterizationCases' tests/ShaderRecompilerComputeTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 5966 --- 🏁 Script executed: ```bash set -o pipefail printf '%s\n' '--- enclosing function ---' sed -n '5480,5665p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- skip counter and nearby invocation/consumption ---' sed -n '2035,2080p' tests/ShaderRecompilerComputeTests.cpp rg -n -C 8 -F -- 'm_skipped_cases' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- all function call sites with surrounding code ---' sed -n '49755,49890p' tests/ShaderRecompilerComputeTests.cpp sed -n '50070,50120p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- comparison diff for the implicated function ---' git diff 7b7f9a70c652afd6ec8ea8599884d9b4b3abc9f3 -- tests/ShaderRecompilerComputeTests.cpp | sed -n '/CheckUnifiedTextureCacheFlow/,/CheckUnifiedImageViewCache/p' ``` Repository: KytyPS5/KytyPS5 Length of output: 20937 --- 🏁 Script executed: ```bash set -o pipefail printf '%s\n' '--- remaining CheckUnifiedTextureCacheFlow body ---' sed -n '5660,6925p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- skip API consumers and all skip calls ---' rg -n -C 12 -F -e 'SkippedCaseCount()' -e 'SkipRasterizationCases(' tests printf '%s\n' '--- function boundaries and runner tail ---' rg -n -F -e 'void CheckUnifiedTextureCacheFlow' -e 'int main' -e 'Run' tests/ShaderRecompilerComputeTests.cpp | head -80 sed -n '50090,50170p' tests/ShaderRecompilerComputeTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 41988 --- 🏁 Script executed: ```bash set -o pipefail printf '%s\n' '--- post-2x flow ---' nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6850,6965p' printf '%s\n' '--- later independent cache checks ---' nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6965,7075p' printf '%s\n' '--- enclosing function end ---' python3 - <<'PY' from pathlib import Path p = Path('tests/ShaderRecompilerComputeTests.cpp') lines = p.read_text().splitlines() start = next(i for i, line in enumerate(lines) if 'void CheckUnifiedTextureCacheFlow()' in line) for i in range(start + 1, len(lines)): if lines[i].startswith(' void ') and i > start: print(f'next member: {i+1}: {lines[i]}') break PY ``` Repository: KytyPS5/KytyPS5 Length of output: 14965 --- 🏁 Script executed: ```bash set -o pipefail printf '%s\n' '--- exact continuation after the 2x case ---' nl -ba tests/ShaderRecompilerComputeTests.cpp | sed -n '6880,7045p' printf '%s\n' '--- later test labels in this function ---' python3 - <<'PY' from pathlib import Path lines = Path('tests/ShaderRecompilerComputeTests.cpp').read_text().splitlines() start = next(i for i, line in enumerate(lines) if 'void CheckUnifiedTextureCacheFlow()' in line) for i in range(start, min(len(lines), 7600)): if 'Require(name,' in lines[i] or 'multisample_source' in lines[i] or '4x' in lines[i]: print(f'{i+1}: {lines[i].strip()}') PY ``` Repository: KytyPS5/KytyPS5 Length of output: 17432 --- </details> **Do not return from the entire cache-flow test.** When no 2x format is supported, `SkipRasterizationCases(1)` records only the 2x case, but `return` exits `CheckUnifiedTextureCacheFlow`. This prevents the independent `four-sample depth overlap` check and later cache checks from running. Guard the 2x-dependent checks instead, then continue with the later cases and record each separately skipped case. <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:396fcd35180483d1941afdf6 --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-22 03:30 UTC · original · reviewed

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9a23782b-c892-4164-983f-28efa3128c5f
📥 Commits

Reviewing files that changed from the base of the PR and between d7c1896647 and 652e794096.

📒 Files selected for processing: 1
  • 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-22 03:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#pullrequestreview-5608932453) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 2** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `9a23782b-c892-4164-983f-28efa3128c5f` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between d7c1896647248b294bc56050c0006cdbb43a87d2 and 652e794096c1cb96e7dca56f0645175e7e42fd10. </details> <details> <summary>📒 Files selected for processing: 1</summary> * `tests/ShaderRecompilerComputeTests.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=9b31051f-adee-46ed-8b71-33ee0cb0992f attempt=258dcc00-e384-4501-92a7-28aee7d560a1 batch=1/1 -->
Author
Owner

@⁠theantipopau on GitHub · 2026-10-22 03:46 UTC · original

Both CodeRabbit findings:

  1. Feedback-loop usage bit — fixed in 4cd3077b. ImageUsageFlags adds eAttachmentFeedbackLoopEXT for a sampled depth image when the device enables the feature, so the probe now asks for the same usage. Without it a format could pass the probe and still EXIT inside Image::Image.

  2. Early return from CheckUnifiedTextureCacheFlow — leaving this as is for now, because the 2x depth image is not confined to a block I can guard. The fixture continues to use ms_depth_image / ms_depth_module well past the four-sample check (the observer pipeline near the end is built from that module and destroyed at the end of the function), so a guard would have to wrap nearly the whole remaining fixture, not the ~90 lines that create it. The SkipRasterizationCases(1) + return is the same shape the other device-feature fixtures in this harness use, and it records one skipped case rather than aborting the run. Splitting the fixture so the four-sample and fault-boundary checks run independently of the 2x depth target is worth doing, but as its own change.

**@⁠theantipopau** on GitHub · 2026-10-22 03:46 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#issuecomment-6332175558) Both CodeRabbit findings: 1. **Feedback-loop usage bit** — fixed in 4cd3077b. `ImageUsageFlags` adds `eAttachmentFeedbackLoopEXT` for a sampled depth image when the device enables the feature, so the probe now asks for the same usage. Without it a format could pass the probe and still `EXIT` inside `Image::Image`. 2. **Early return from `CheckUnifiedTextureCacheFlow`** — leaving this as is for now, because the 2x depth image is not confined to a block I can guard. The fixture continues to use `ms_depth_image` / `ms_depth_module` well past the four-sample check (the observer pipeline near the end is built from that module and destroyed at the end of the function), so a guard would have to wrap nearly the whole remaining fixture, not the ~90 lines that create it. The `SkipRasterizationCases(1)` + return is the same shape the other device-feature fixtures in this harness use, and it records one skipped case rather than aborting the run. Splitting the fixture so the four-sample and fault-boundary checks run independently of the 2x depth target is worth doing, but as its own change.
Author
Owner

@⁠MuteRex on GitHub · 2026-10-22 15:59 UTC · original

Retested #1811 (4cd3077) on AMD RDNA4 as requested. Confirmed: the six D24S8 aborts are gone.

Hardware: RX 9060 XT (RADV GFX1200), Mesa 26.0.8, Ubuntu 26.04, kernel 7.0.0-38

Both builds are kyty_emulator + kyty_tests, Release, Clang, no Qt. The base is the PR's own parent commit, so the only difference between them is this PR.

Build Result
base 7b7f9a7 8 failed / 57
7b7f9a7 + #1811 (4cd3077) 2 failed / 57

On the base build, texture_cache_layered_image, texture_cache_image_views, texture_cache_storage_sampled, texture_cache_image_overlap, texture_cache_htile_clear and buffer_cache_ranges all fail with image format does not support required usage: format=129 type=1 usage=0x23. With #1811 all six pass, and format=129 no longer appears anywhere in the log.

The two remaining failures are the same in both builds and unrelated to this PR:

  • shader_recompiler_compute: BoundedRecordBufferAccess32
  • gpu_tiler: GpuTilerCpuParity mismatch at detile bytes family=4 bpe=1 (the one #795 addressed)

The 4 emulator CLI tests that showed "Not Run" last time now pass, because I built kyty_emulator this time.

Logs for both runs are attached.

AI assistance (Claude) was used to build both versions, run the suites and summarise the logs. I ran the tests on my own hardware and reviewed the results.

kytyps5-pr1811-tests.zip

**@⁠MuteRex** on GitHub · 2026-10-22 15:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#issuecomment-6345210639) Retested #1811 (4cd3077) on AMD RDNA4 as requested. Confirmed: the six D24S8 aborts are gone. **Hardware:** RX 9060 XT (RADV GFX1200), Mesa 26.0.8, Ubuntu 26.04, kernel 7.0.0-38 Both builds are `kyty_emulator` + `kyty_tests`, Release, Clang, no Qt. The base is the PR's own parent commit, so the only difference between them is this PR. | Build | Result | |---|---| | base 7b7f9a7 | 8 failed / 57 | | 7b7f9a7 + #1811 (4cd3077) | 2 failed / 57 | On the base build, `texture_cache_layered_image`, `texture_cache_image_views`, `texture_cache_storage_sampled`, `texture_cache_image_overlap`, `texture_cache_htile_clear` and `buffer_cache_ranges` all fail with `image format does not support required usage: format=129 type=1 usage=0x23`. With #1811 all six pass, and `format=129` no longer appears anywhere in the log. The two remaining failures are the same in both builds and unrelated to this PR: - `shader_recompiler_compute`: `BoundedRecordBufferAccess32` - `gpu_tiler`: `GpuTilerCpuParity` mismatch at `detile bytes family=4 bpe=1` (the one #795 addressed) The 4 emulator CLI tests that showed "Not Run" last time now pass, because I built `kyty_emulator` this time. Logs for both runs are attached. *AI assistance (Claude) was used to build both versions, run the suites and summarise the logs. I ran the tests on my own hardware and reviewed the results.* [kytyps5-pr1811-tests.zip](https://github.com/user-attachments/files/33830505/kytyps5-pr1811-tests.zip)
Author
Owner

@⁠theantipopau on GitHub · 2026-11-04 22:36 UTC · original

Rebased onto 91c5820c and checked this on Windows (clang-cl, Release, Vulkan 1.4.357, Radeon RX 9070 XT). The three patched fixtures do use the probe, but these entries still abort before reporting a result:

texture_cache_layered_image, texture_cache_image_views, texture_cache_storage_sampled, texture_cache_htile_clear, buffer_cache_ranges (and texture_cache_image_overlap segfaults instead).

All of them end in

image format does not support required usage: format=129 type=1 usage=0x23 flags=0x0 samples=2
 in src/graphics/host_gpu/renderer/image/image.cpp

format=129 is VK_FORMAT_D24_UNORM_S8_UINT and usage=0x23 is depth-stencil attachment plus transfer source and destination — note there is no sampled bit. SupportedDepthStencilFormat probes depth-stencil attachment + sampled + transfer, so it never covers the usage these fixtures actually request, and they build a two-sample D24S8 image through a path this PR does not touch. They would need the same probe (or a skip) with the unit's real usage mask.

**@⁠theantipopau** on GitHub · 2026-11-04 22:36 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#issuecomment-6643917599) Rebased onto `91c5820c` and checked this on Windows (clang-cl, Release, Vulkan 1.4.357, Radeon RX 9070 XT). The three patched fixtures do use the probe, but these entries still abort before reporting a result: `texture_cache_layered_image`, `texture_cache_image_views`, `texture_cache_storage_sampled`, `texture_cache_htile_clear`, `buffer_cache_ranges` (and `texture_cache_image_overlap` segfaults instead). All of them end in ``` image format does not support required usage: format=129 type=1 usage=0x23 flags=0x0 samples=2 in src/graphics/host_gpu/renderer/image/image.cpp ``` `format=129` is `VK_FORMAT_D24_UNORM_S8_UINT` and `usage=0x23` is depth-stencil attachment plus transfer source and destination — note there is no sampled bit. `SupportedDepthStencilFormat` probes depth-stencil attachment + sampled + transfer, so it never covers the usage these fixtures actually request, and they build a two-sample D24S8 image through a path this PR does not touch. They would need the same probe (or a skip) with the unit's real usage mask.
Author
Owner

@⁠theantipopau on GitHub · 2026-11-04 23:19 UTC · original

Superseded by #2118, which carries the two commits here onto current main and fixes what they missed.

The probe in this PR asks for DepthStencilAttachment | Sampled | TransferSrc | TransferDst, but ImageUsageFlags only adds the sampled bit (and with it the feedback-loop bit) when vkGetFormatProperties advertises sampled-image support, so on a device that rejects D24S8 the probe could pass for a format the constructor then could not create — and the two-sample target and the D16 promotion check were still hardcoded. #2118 mirrors the exact mask, resolves the format at the sample count each fixture uses, and derives the D16 promotion encoding from the resolved host format. Verified on Radeon RX 9070 XT: five of the six texture-cache entries now pass and the suite goes 73 -> 78 of 82.

**@⁠theantipopau** on GitHub · 2026-11-04 23:19 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1811#issuecomment-6644807417) Superseded by #2118, which carries the two commits here onto current `main` and fixes what they missed. The probe in this PR asks for `DepthStencilAttachment | Sampled | TransferSrc | TransferDst`, but `ImageUsageFlags` only adds the sampled bit (and with it the feedback-loop bit) when `vkGetFormatProperties` advertises sampled-image support, so on a device that rejects D24S8 the probe could pass for a format the constructor then could not create — and the two-sample target and the D16 promotion check were still hardcoded. #2118 mirrors the exact mask, resolves the format at the sample count each fixture uses, and derives the D16 promotion encoding from the resolved host format. Verified on Radeon RX 9070 XT: five of the six texture-cache entries now pass and the suite goes 73 -> 78 of 82.

Pull request closed

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