tests: skip rasterization cases instead of aborting the suite on limited GPUs #875

Manually merged
github merged 1 commit from gh-pr/875/head into gh-pr/875/base 2026-11-26 09:35:42 +00:00
Owner

@⁠theantipopau on GitHub · 2026-09-27 21:45 UTC · original
theantipopau:vk-harness-skip → main · +102 −52 · 1 files · 1 commits · merged 2026-09-28 21:41 UTC

Summary

VulkanHarness treated a missing GPU capability as a test failure. The
constructor called

Require("VulkanHarness", "graphics", /* ... */,
        "production rasterization features are not supported");

so any device lacking one of eight production features never reached a single
test case. The binary aborted during construction and took the entire suite
with it — 79 host-side and compute cases that have nothing to do with
rasterization.

This is a hard abort, not a skip. It means the suite is only runnable on a
GPU that happens to expose the full production feature set, which is why this
has gone unnoticed: Windows CI only builds this target and runs a
-R "^(audio_out2_port|ime_dialog|lru_cache|...)$" subset, so no automated
run has ever exercised the failure.

Before

Local AMD device, no VK_EXT_attachment_feedback_loop_dynamic_state:

$ ./shader_recompiler_compute_tests.exe
[host]    LeastRecentlyUsedCache           ok
[host]    ProductionRasterization   unavailable, rasterization cases will be skipped
...
thread 1234 has overflowed its stack
0xc0000409 (STATUS_STACK_BUFFER_OVERRUN)

Zero test cases executed.

After

$ ./shader_recompiler_compute_tests.exe
[host]    LeastRecentlyUsedCache           ok
[host]    ProductionRasterization   unavailable, rasterization cases will be skipped
[host]    RenderTargetFormat               ok
...
[compute] ScalarFlbitI32B32Gpu             ok

79 cases now execute (55 host-side, 24 compute) where 0 did before.

What changed

  • m_rasterization_supported is computed in the constructor and reported via
    RasterizationSupported(). It is no longer a fatal Require.
  • The rasterization feature chain (depthClipEnable, depthClipControl,
    colorWriteEnable, attachmentFeedbackLoopLayout,
    attachmentFeedbackLoopDynamicState, provokingVertexLast) and the six
    corresponding extensions are only requested when the device reports them.
    Requesting an unsupported feature fails vkCreateDevice, so the chain has to
    be built conditionally.
  • RunGraphicsCase counts and skips graphics cases instead of running them.
  • The device-side checks in main that rasterize are gated. Host-side checks
    (CheckRenderTargetFormatContract, the PM4 parser checks, opcode coverage,
    …) and every compute case run unconditionally.
  • The skip report is derived from a counter rather than a hand-written total,
    so it cannot drift from the number of guarded calls.

Devices with the full feature set

m_rasterization_supported is true, every extension and feature is requested
exactly as before, every guard is taken, and SkippedCaseCount() is 0. This
path is unchanged.

Testing

  • Builds clean on Windows/clang-cl.
  • Full run on a device missing production rasterization features: 55 host + 24
    compute cases execute, no abort.
  • One genuine compute failure is now reachable for the first time
    (ScalarSaveExecOps); it is a real failure in the recompiler, not a
    consequence of this change, and is being looked at separately.
**@⁠theantipopau** on GitHub · 2026-09-27 21:45 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875) `theantipopau:vk-harness-skip` → `main` · +102 −52 · 1 files · 1 commits · merged 2026-09-28 21:41 UTC ## Summary `VulkanHarness` treated a *missing GPU capability* as a *test failure*. The constructor called ```cpp Require("VulkanHarness", "graphics", /* ... */, "production rasterization features are not supported"); ``` so any device lacking one of eight production features never reached a single test case. The binary aborted during construction and took the entire suite with it — 79 host-side and compute cases that have nothing to do with rasterization. This is a hard abort, not a skip. It means the suite is only runnable on a GPU that happens to expose the full production feature set, which is why this has gone unnoticed: Windows CI only *builds* this target and runs a `-R "^(audio_out2_port|ime_dialog|lru_cache|...)$"` subset, so no automated run has ever exercised the failure. ## Before Local AMD device, no `VK_EXT_attachment_feedback_loop_dynamic_state`: ``` $ ./shader_recompiler_compute_tests.exe [host] LeastRecentlyUsedCache ok [host] ProductionRasterization unavailable, rasterization cases will be skipped ... thread 1234 has overflowed its stack 0xc0000409 (STATUS_STACK_BUFFER_OVERRUN) ``` Zero test cases executed. ## After ``` $ ./shader_recompiler_compute_tests.exe [host] LeastRecentlyUsedCache ok [host] ProductionRasterization unavailable, rasterization cases will be skipped [host] RenderTargetFormat ok ... [compute] ScalarFlbitI32B32Gpu ok ``` 79 cases now execute (55 host-side, 24 compute) where 0 did before. ## What changed - `m_rasterization_supported` is computed in the constructor and reported via `RasterizationSupported()`. It is no longer a fatal `Require`. - The rasterization feature chain (`depthClipEnable`, `depthClipControl`, `colorWriteEnable`, `attachmentFeedbackLoopLayout`, `attachmentFeedbackLoopDynamicState`, `provokingVertexLast`) and the six corresponding extensions are only requested when the device reports them. Requesting an unsupported feature fails `vkCreateDevice`, so the chain has to be built conditionally. - `RunGraphicsCase` counts and skips graphics cases instead of running them. - The device-side checks in `main` that rasterize are gated. Host-side checks (`CheckRenderTargetFormatContract`, the PM4 parser checks, opcode coverage, …) and every compute case run unconditionally. - The skip report is derived from a counter rather than a hand-written total, so it cannot drift from the number of guarded calls. ## Devices with the full feature set `m_rasterization_supported` is `true`, every extension and feature is requested exactly as before, every guard is taken, and `SkippedCaseCount()` is `0`. This path is unchanged. ## Testing - Builds clean on Windows/clang-cl. - Full run on a device missing production rasterization features: 55 host + 24 compute cases execute, no abort. - One genuine compute failure is now reachable for the first time (`ScalarSaveExecOps`); it is a real failure in the recompiler, not a consequence of this change, and is being looked at separately.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:35:40 +00:00
github manually merged commit f00124e79e into gh-pr/875/base 2026-11-26 09:35:42 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-27 21:50 UTC · original · edited 2026-09-28 20:38 UTC

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5ccd705b-d272-43d2-a06b-3fdc10d132b4

📥 Commits

Reviewing files that changed from the base of the PR and between 8a238b35b778169ce2702c250755fb7a73b63479 and f00124e79e.

📒 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; 6 remain after this review.


📝 Walkthrough

Walkthrough

The Vulkan test harness now detects whether all required production rasterization features are available. When they are unavailable, device creation omits rasterization-specific feature enables and extensions. Rasterization-dependent graphics cases and device checks are skipped, while host-side checks continue. The runner reports skipped checks and graphics cases.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f0012

Devices without rasterization support can run the remaining checks with skips reported. No actionable merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to f0012

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: VulkanHarness adds accessors for rasterization support and the skipped-case count, plus a method to increment that count.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: VulkanHarness adds state recording whether rasterization is supported and how many graphics cases were skipped.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: The runtime context now enables attachment feedback-loop and last-provoking-vertex behavior only when rasterization is supported, rather than unconditionally.
  • observed — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: The harness now records whether all required rasterization features are available and prints a notice when they are not; previously, missing any required feature caused a graphics requirement failure.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: skipping rasterization cases instead of aborting the test suite on GPUs with limited support.
Description check ✅ Passed The description directly explains the rasterization capability handling, conditional feature setup, skipped graphics cases, and continued host and compute testing.
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.

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-09-27 21:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875#issuecomment-5860141478) · edited 2026-09-28 20:38 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/875?cs_source=review_comment"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> Navigate logical layers of code changes, visualize relationships, and explore their blast radius. <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `5ccd705b-d272-43d2-a06b-3fdc10d132b4` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 8a238b35b778169ce2702c250755fb7a73b63479 and f00124e79e12144bb47ffd0461888658961be3ec. </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; 6 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The Vulkan test harness now detects whether all required production rasterization features are available. When they are unavailable, device creation omits rasterization-specific feature enables and extensions. Rasterization-dependent graphics cases and device checks are skipped, while host-side checks continue. The runner reports skipped checks and graphics cases. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"f00124e79e12144bb47ffd0461888658961be3ec" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `f0012` <!-- final_review_risk_coverage:{"sourceCommitId":"f00124e79e12144bb47ffd0461888658961be3ec","coveredCommitId":"f00124e79e12144bb47ffd0461888658961be3ec","kind":"reviewed"} --> Devices without rasterization support can run the remaining checks with skips reported. No actionable merge-blocking risk remains. <!-- final_review_risk_end --> <!-- architecture_review_start --> ### Architecture Summary **Architecture risk:** _🔵 Low_ · up to `f0012` The change affects 1 system. **Changed systems:** `tests` **Architecture concerns** No architecture-level concerns identified. <details> <summary>Review details</summary> **Systems and components** - _observed_ — tests (service) was modified; 1 changed file maps to changed impact. **Before / after behavior** - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: `VulkanHarness` adds accessors for rasterization support and the skipped-case count, plus a method to increment that count. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: `VulkanHarness` adds state recording whether rasterization is supported and how many graphics cases were skipped. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: The runtime context now enables attachment feedback-loop and last-provoking-vertex behavior only when rasterization is supported, rather than unconditionally. - _observed_ — Modified behavior in tests/ShaderRecompilerComputeTests.cpp: The harness now records whether all required rasterization features are available and prints a notice when they are not; previously, missing any required feature caused a graphics requirement failure. </details> <!-- architecture_review_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 5</summary> <details> <summary>✅ Passed checks (5 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ✅ Passed | The title clearly and concisely describes the main change: skipping rasterization cases instead of aborting the test suite on GPUs with limited support. | | Description check | ✅ Passed | The description directly explains the rasterization capability handling, conditional feature setup, skipped graphics cases, and continued host and compute testing. | | 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. | </details> </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=875)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [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) </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
@ -16132,0 +16144,4 @@
std::printf(
"[host] ProductionRasterization unavailable, rasterization cases "
"will be skipped\n");
}
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-27 21:50 UTC · original

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n 'EnsureRuntimeContext|attachment_feedback_loop_enabled|provoking_vertex_last_enabled|CheckImageTransitionState|CheckPm4' tests/ShaderRecompilerComputeTests.cpp
sed -n '15960,16082p' tests/ShaderRecompilerComputeTests.cpp
sed -n '34805,34955p' tests/ShaderRecompilerComputeTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 16987


🏁 Script executed:

set -eu
printf '%s\n' '--- EnsureRuntimeContext and nearby runtime context setup ---'
sed -n '15760,15840p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- all exact flag consumers ---'
rg -n -C 5 'attachment_feedback_loop_enabled|provoking_vertex_last_enabled' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- CheckImageTransitionState ---'
sed -n '30735,30845p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- CheckPm4 implementations: first group ---'
sed -n '32920,33145p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- CheckPm4 implementations: second group ---'
sed -n '33235,33560p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- CheckPm4ContextStateOperations ---'
sed -n '33805,33935p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- runtime renderer/context declarations and bindings ---'
rg -n -C 8 'RuntimeContext\(\)|RuntimeRenderer\(\)|m_runtime_context|RenderContext' tests/ShaderRecompilerComputeTests.cpp | head -n 260

Repository: KytyPS5/KytyPS5

Length of output: 41893


🏁 Script executed:

set -eu
printf '%s\n' '--- repository-wide capability flag references ---'
rg -n -C 4 'attachment_feedback_loop_enabled|provoking_vertex_last_enabled' .
printf '%s\n' '--- relevant Vulkan operations and layout enums ---'
rg -n -C 3 'setAttachmentFeedbackLoopEnableEXT|attachmentFeedbackLoopOptimal|provokingVertex|ProvokingVertex|AttachmentFeedbackLoop' .
printf '%s\n' '--- runtime context declarations and renderer binding ---'
rg -n -C 6 'struct RuntimeContext|class RuntimeContext|RuntimeContext|RuntimeRenderer\(\)|m_runtime_context' --glob '*.{h,hpp,cpp,cc,cxx}'

Repository: KytyPS5/KytyPS5

Length of output: 42420


Derive runtime feature flags from device enablement.

When m_rasterization_supported is false, device creation omits the feedback-loop and provoking-vertex extensions. EnsureRuntimeContext() still sets both flags to true. A feature-dependent render path can then select eAttachmentFeedbackLoopOptimalEXT, issue setAttachmentFeedbackLoopEnableEXT, or add provoking-vertex pipeline state without the enabled extensions.

The currently ungated CheckImageTransitionState and CheckPm4* checks exercise image barriers and PM4 state. They do not themselves trigger this Vulkan path. Keep the runtime context consistent with the device:

Suggested fix
-    m_runtime_context.attachment_feedback_loop_enabled = true;
-    m_runtime_context.provoking_vertex_last_enabled = true;
+    m_runtime_context.attachment_feedback_loop_enabled = m_rasterization_supported;
+    m_runtime_context.provoking_vertex_last_enabled = m_rasterization_supported;
**@⁠coderabbitai[bot]** on GitHub · 2026-09-27 21:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875#discussion_r4117107838) _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash rg -n 'EnsureRuntimeContext|attachment_feedback_loop_enabled|provoking_vertex_last_enabled|CheckImageTransitionState|CheckPm4' tests/ShaderRecompilerComputeTests.cpp sed -n '15960,16082p' tests/ShaderRecompilerComputeTests.cpp sed -n '34805,34955p' tests/ShaderRecompilerComputeTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 16987 --- 🏁 Script executed: ```bash set -eu printf '%s\n' '--- EnsureRuntimeContext and nearby runtime context setup ---' sed -n '15760,15840p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- all exact flag consumers ---' rg -n -C 5 'attachment_feedback_loop_enabled|provoking_vertex_last_enabled' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- CheckImageTransitionState ---' sed -n '30735,30845p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- CheckPm4 implementations: first group ---' sed -n '32920,33145p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- CheckPm4 implementations: second group ---' sed -n '33235,33560p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- CheckPm4ContextStateOperations ---' sed -n '33805,33935p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- runtime renderer/context declarations and bindings ---' rg -n -C 8 'RuntimeContext\(\)|RuntimeRenderer\(\)|m_runtime_context|RenderContext' tests/ShaderRecompilerComputeTests.cpp | head -n 260 ``` Repository: KytyPS5/KytyPS5 Length of output: 41893 --- 🏁 Script executed: ```bash set -eu printf '%s\n' '--- repository-wide capability flag references ---' rg -n -C 4 'attachment_feedback_loop_enabled|provoking_vertex_last_enabled' . printf '%s\n' '--- relevant Vulkan operations and layout enums ---' rg -n -C 3 'setAttachmentFeedbackLoopEnableEXT|attachmentFeedbackLoopOptimal|provokingVertex|ProvokingVertex|AttachmentFeedbackLoop' . printf '%s\n' '--- runtime context declarations and renderer binding ---' rg -n -C 6 'struct RuntimeContext|class RuntimeContext|RuntimeContext|RuntimeRenderer\(\)|m_runtime_context' --glob '*.{h,hpp,cpp,cc,cxx}' ``` Repository: KytyPS5/KytyPS5 Length of output: 42420 --- </details> **Derive runtime feature flags from device enablement.** When `m_rasterization_supported` is false, device creation omits the feedback-loop and provoking-vertex extensions. `EnsureRuntimeContext()` still sets both flags to `true`. A feature-dependent render path can then select `eAttachmentFeedbackLoopOptimalEXT`, issue `setAttachmentFeedbackLoopEnableEXT`, or add provoking-vertex pipeline state without the enabled extensions. The currently ungated `CheckImageTransitionState` and `CheckPm4*` checks exercise image barriers and PM4 state. They do not themselves trigger this Vulkan path. Keep the runtime context consistent with the device: <details> <summary>Suggested fix</summary> ```diff - m_runtime_context.attachment_feedback_loop_enabled = true; - m_runtime_context.provoking_vertex_last_enabled = true; + m_runtime_context.attachment_feedback_loop_enabled = m_rasterization_supported; + m_runtime_context.provoking_vertex_last_enabled = m_rasterization_supported; ``` </details> <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:6317170099bf941f25e07eb6 --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -35543,0 +35580,4 @@
#endif
} else {
skipped_device_checks = true;
}
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-27 21:50 UTC · original

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '34890,34930p' tests/ShaderRecompilerComputeTests.cpp
rg -n 'Check.*Dispatch|Check.*Compute' tests/ShaderRecompilerComputeTests.cpp | tail -90

Repository: KytyPS5/KytyPS5

Length of output: 1946


🏁 Script executed:

printf '%s\n' '--- CheckNativeIndirectDispatch implementation ---'
sed -n '8800,8925p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- Other dispatch/compute call sites ---'
sed -n '34655,34715p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- Device feature and rasterization state references ---'
rg -n -C 3 'rasterization|RasterizationSupported|native.*indirect|indirect.*dispatch|drawIndirect|dispatchIndirect|CheckComputeMetaClearClassification' tests/ShaderRecompilerComputeTests.cpp | head -260

Repository: KytyPS5/KytyPS5

Length of output: 17292


🏁 Script executed:

printf '%s\n' '--- CheckNativeIndirectDispatch remainder ---'
sed -n '8920,9075p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- CheckComputeMetaClearClassification implementation ---'
sed -n '4525,4625p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- VulkanHarness feature setup ---'
sed -n '15920,16085p' tests/ShaderRecompilerComputeTests.cpp
printf '%s\n' '--- Normal runner gate context ---'
sed -n '34805,34955p' tests/ShaderRecompilerComputeTests.cpp

Repository: KytyPS5/KytyPS5

Length of output: 27853


Run CheckNativeIndirectDispatch() without the rasterization gate.

CheckNativeIndirectDispatch() uses compute shaders, DispatchDirect, CpOpDispatchIndirect, and buffer-cache operations. It does not create a graphics pipeline or issue rasterization commands. When RasterizationSupported() is false, the current gate skips this compute check even though its required device features remain enabled. Move this call before the gate.

Suggested fix
+  vulkan.CheckNativeIndirectDispatch();
   if (rasterization) {
     vulkan.CheckSchedulerTimeline();
     vulkan.CheckHostImageAllocation();
@@
-    vulkan.CheckNativeIndirectDispatch();
 #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  vulkan.CheckNativeIndirectDispatch();
  if (rasterization) {
    vulkan.CheckSchedulerTimeline();
    vulkan.CheckHostImageAllocation();
    vulkan.CheckDescriptorHeapLargeSet();
    vulkan.CheckGraphicsPushConstantBank();
    vulkan.CheckGpuMappedRangeLifecycle();
    vulkan.CheckStreamBufferRing();
    vulkan.CheckGpuTilerCpuParity();
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
    vulkan.CheckRenderExecutorColorDiscovery();
    vulkan.CheckRenderExecutorColorVolumeDiscovery();
    vulkan.CheckRenderExecutorColorMetadataClear();
    vulkan.CheckSampledDccClear();
    vulkan.CheckRenderExecutorColorStandardTileDiscovery();
    vulkan.CheckRenderExecutorColorDepthTileDiscovery();
    vulkan.CheckRenderExecutorStencilBindingDiscovery();
    vulkan.CheckUnifiedTextureCacheFlow();
    vulkan.CheckBgra16Readback();
    vulkan.CheckRasterization(false);
    vulkan.CheckRasterization(false, true);
    vulkan.CheckBufferCacheDirtyGarbageCollection();
#endif
    vulkan.CheckUnifiedImageViewCache();
    vulkan.CheckPackedTextureComponents();
    vulkan.CheckCubeFaceStorageExpansion();
  } else {
    skipped_device_checks = true;
  }
**@⁠coderabbitai[bot]** on GitHub · 2026-09-27 21:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875#discussion_r4117107847) _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash sed -n '34890,34930p' tests/ShaderRecompilerComputeTests.cpp rg -n 'Check.*Dispatch|Check.*Compute' tests/ShaderRecompilerComputeTests.cpp | tail -90 ``` Repository: KytyPS5/KytyPS5 Length of output: 1946 --- 🏁 Script executed: ```bash printf '%s\n' '--- CheckNativeIndirectDispatch implementation ---' sed -n '8800,8925p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- Other dispatch/compute call sites ---' sed -n '34655,34715p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- Device feature and rasterization state references ---' rg -n -C 3 'rasterization|RasterizationSupported|native.*indirect|indirect.*dispatch|drawIndirect|dispatchIndirect|CheckComputeMetaClearClassification' tests/ShaderRecompilerComputeTests.cpp | head -260 ``` Repository: KytyPS5/KytyPS5 Length of output: 17292 --- 🏁 Script executed: ```bash printf '%s\n' '--- CheckNativeIndirectDispatch remainder ---' sed -n '8920,9075p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- CheckComputeMetaClearClassification implementation ---' sed -n '4525,4625p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- VulkanHarness feature setup ---' sed -n '15920,16085p' tests/ShaderRecompilerComputeTests.cpp printf '%s\n' '--- Normal runner gate context ---' sed -n '34805,34955p' tests/ShaderRecompilerComputeTests.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 27853 --- </details> **Run `CheckNativeIndirectDispatch()` without the rasterization gate.** `CheckNativeIndirectDispatch()` uses compute shaders, `DispatchDirect`, `CpOpDispatchIndirect`, and buffer-cache operations. It does not create a graphics pipeline or issue rasterization commands. When `RasterizationSupported()` is false, the current gate skips this compute check even though its required device features remain enabled. Move this call before the gate. <details><summary>Suggested fix</summary> ```diff + vulkan.CheckNativeIndirectDispatch(); if (rasterization) { vulkan.CheckSchedulerTimeline(); vulkan.CheckHostImageAllocation(); @@ - vulkan.CheckNativeIndirectDispatch(); #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion vulkan.CheckNativeIndirectDispatch(); if (rasterization) { vulkan.CheckSchedulerTimeline(); vulkan.CheckHostImageAllocation(); vulkan.CheckDescriptorHeapLargeSet(); vulkan.CheckGraphicsPushConstantBank(); vulkan.CheckGpuMappedRangeLifecycle(); vulkan.CheckStreamBufferRing(); vulkan.CheckGpuTilerCpuParity(); #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS vulkan.CheckRenderExecutorColorDiscovery(); vulkan.CheckRenderExecutorColorVolumeDiscovery(); vulkan.CheckRenderExecutorColorMetadataClear(); vulkan.CheckSampledDccClear(); vulkan.CheckRenderExecutorColorStandardTileDiscovery(); vulkan.CheckRenderExecutorColorDepthTileDiscovery(); vulkan.CheckRenderExecutorStencilBindingDiscovery(); vulkan.CheckUnifiedTextureCacheFlow(); vulkan.CheckBgra16Readback(); vulkan.CheckRasterization(false); vulkan.CheckRasterization(false, true); vulkan.CheckBufferCacheDirtyGarbageCollection(); #endif vulkan.CheckUnifiedImageViewCache(); vulkan.CheckPackedTextureComponents(); vulkan.CheckCubeFaceStorageExpansion(); } else { skipped_device_checks = true; } ``` </details> <!-- suggestion_end --> <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:61d9b876e7a0dfb4aaae0ce0 --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-27 21:50 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: ee0d5843-91b1-4c42-84a8-6aa13e5c077c

📥 Commits

Reviewing files that changed from the base of the PR and between 421684e75f and 8a238b35b778169ce2702c250755fb7a73b63479.

📒 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-09-27 21:50 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875#pullrequestreview-5332249358) · **reviewed** **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**: `ee0d5843-91b1-4c42-84a8-6aa13e5c077c` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 421684e75f75e6d1a2c4b0817ca573a2e800f748 and 8a238b35b778169ce2702c250755fb7a73b63479. </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 -->
Author
Owner

@⁠theantipopau on GitHub · 2026-09-27 22:06 UTC · original

What this unlocks, measured

With the abort replaced by a skip, the suite runs end to end on a device that
lacks the production rasterization features. Full run:

host-side checks:  55 executed
compute cases:    418 executed
failures:           6
graphics cases:     17 skipped

Fail normally calls std::abort(), so the six were enumerated by running once
with a temporary non-fatal Fail (not part of this PR). Two of the eight
originally found have been fixed in #876; the remaining six are listed below.

Case Status
ScalarSaveExecOps fixed in #876
ScalarOrn2SaveexecUsesSourceOrNotExec fixed in #876
VectorFractF16CapturedAndEdges open
FloatInlineConstantF16UsesNumericValue open
BufferStoreFormatXyzwFloat16ConvertsComponents open
BranchVccnzUsesWaveMask open
BranchVccnzUsesCarryProducedWaveMask open
BufferStoreFormatXAddTidUsesLaneIndex open

None of these are reachable today on any machine that is missing one of the
eight rasterization features, which is why they have survived.

The three f16 cases: 1 ULP

FloatInlineConstantF16UsesNumericValue
  expected 0xbbbb3118   actual 0xbbbb3117
BufferStoreFormatXyzwFloat16ConvertsComponents
  expected 0xc0003c04   actual 0xc0003c03

Both are exactly one ULP low, in the last mantissa bit — the signature of a
rounding-mode difference rather than a wrong computation. Both case names
(...Captured...) suggest the expectations were read back from a hardware dump,
so this may be host rounding rather than a recompiler defect. Flagging rather
than claiming a bug: it needs someone who knows which rounding the emitter is
supposed to produce.

The remaining launch-configuration cases

BranchVccnzUsesWaveMask, BranchVccnzUsesCarryProducedWaveMask and
BufferStoreFormatXAddTidUsesLaneIndex share the root cause diagnosed in #876
— the harness dispatches a 1x1x1 workgroup by default, so
OpGroupNonUniformBallot sees one invocation and wave-mask results are
degenerate. These three do set threads_num explicitly (to 4), so they are
launching a populated 4-lane subgroup and are a different problem:

BranchVccnzUsesWaveMask
  expected [0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a]
  actual   [0x2a, 0x0b, 0x0b, 0x0b, 0x2a, 0x0b, 0x0b, 0x0b]

Lane 0 of each 4-lane group takes the branch and the other three do not. These
look like genuine V_CMP / V_ADDC wave-mask or workgroup-id reconstruction
issues rather than harness configuration, and I have not diagnosed them.

Practical note

shader_recompiler_compute_tests is not in any CI job — the Windows job builds
launcher and runs ctest -R "^(audio_out2_port|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|virtual_memory_allocation)$".
So nothing in CI would have caught the original abort either. A cheap
regression guard would be a job that at least constructs the harness and
reports the skip, on whatever GPU the runner has.

**@⁠theantipopau** on GitHub · 2026-09-27 22:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/875#issuecomment-5860263993) ## What this unlocks, measured With the abort replaced by a skip, the suite runs end to end on a device that lacks the production rasterization features. Full run: ``` host-side checks: 55 executed compute cases: 418 executed failures: 6 graphics cases: 17 skipped ``` `Fail` normally calls `std::abort()`, so the six were enumerated by running once with a temporary non-fatal `Fail` (not part of this PR). Two of the eight originally found have been fixed in #876; the remaining six are listed below. | Case | Status | |---|---| | `ScalarSaveExecOps` | fixed in #876 | | `ScalarOrn2SaveexecUsesSourceOrNotExec` | fixed in #876 | | `VectorFractF16CapturedAndEdges` | open | | `FloatInlineConstantF16UsesNumericValue` | open | | `BufferStoreFormatXyzwFloat16ConvertsComponents` | open | | `BranchVccnzUsesWaveMask` | open | | `BranchVccnzUsesCarryProducedWaveMask` | open | | `BufferStoreFormatXAddTidUsesLaneIndex` | open | None of these are reachable today on any machine that is missing one of the eight rasterization features, which is why they have survived. ## The three f16 cases: 1 ULP ``` FloatInlineConstantF16UsesNumericValue expected 0xbbbb3118 actual 0xbbbb3117 BufferStoreFormatXyzwFloat16ConvertsComponents expected 0xc0003c04 actual 0xc0003c03 ``` Both are exactly one ULP low, in the last mantissa bit — the signature of a rounding-mode difference rather than a wrong computation. Both case names (`...Captured...`) suggest the expectations were read back from a hardware dump, so this may be host rounding rather than a recompiler defect. Flagging rather than claiming a bug: it needs someone who knows which rounding the emitter is supposed to produce. ## The remaining launch-configuration cases `BranchVccnzUsesWaveMask`, `BranchVccnzUsesCarryProducedWaveMask` and `BufferStoreFormatXAddTidUsesLaneIndex` share the root cause diagnosed in #876 — the harness dispatches a 1x1x1 workgroup by default, so `OpGroupNonUniformBallot` sees one invocation and wave-mask results are degenerate. These three *do* set `threads_num` explicitly (to 4), so they are launching a populated 4-lane subgroup and are a different problem: ``` BranchVccnzUsesWaveMask expected [0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a] actual [0x2a, 0x0b, 0x0b, 0x0b, 0x2a, 0x0b, 0x0b, 0x0b] ``` Lane 0 of each 4-lane group takes the branch and the other three do not. These look like genuine `V_CMP` / `V_ADDC` wave-mask or workgroup-id reconstruction issues rather than harness configuration, and I have not diagnosed them. ## Practical note `shader_recompiler_compute_tests` is not in any CI job — the Windows job builds `launcher` and runs `ctest -R "^(audio_out2_port|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|virtual_memory_allocation)$"`. So nothing in CI would have caught the original abort either. A cheap regression guard would be a job that at least *constructs* the harness and reports the skip, on whatever GPU the runner has.
This discussion has been locked. Commenting is limited to contributors.
No description provided.