tests: honor rasterization support in focused modes and enable depthClamp #1154
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1154
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1154/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Nawid3333 on GitHub · 2026-10-07 17:53 UTC · original
Nawid3333:tests/harness-rasterization-skip→main· +40 −9 · 1 files · 3 commits · closed without mergingProblem
On a device without
VK_EXT_attachment_feedback_loop_dynamic_state(here AMD's Windows driver 26.8.1 on an RX 9070 XT),VulkanHarnessprints "ProductionRasterization unavailable, rasterization cases will be skipped" and creates its device without the rasterization features. The default run then skips the production rasterization checks, but six--xxx-onlymodes call some of them unconditionally:CheckRasterizationcreates graphics pipelines with features the device was created without. The validation layer reports:VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter(VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTwithoutVK_EXT_color_write_enable)VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800VUID-VkPipelineViewportDepthClipControlCreateInfoEXT-negativeOneToOne-06470VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782--image-overlap-onlyand--polygon-mode-onlythen crash in the driver.CheckRenderExecutorStencilBindingDiscoveryfails its feedback-loop check ("disjoint sampling used inconsistent image layouts or enabled feedback").Separately, the harness never enables
depthClamp, even when it does enable the other rasterization features. Production pipelines always setdepthClampEnable(shaders.cpp), and the emulator requires and enablesdepthClamp(vulkanWindow.cpp). So the last VUID should also apply on devices with full rasterization support. That is inferred from the code: no such GPU was available here.Fix
CheckRasterizationorCheckRenderExecutorStencilBindingDiscovery, only those calls are guarded, with the default run's skip message. The other calls in those modes still run, for example the render-executor color discovery and metadata-clear checks in--image-overlap-onlyand--compute-meta-clear-only, andCheckComparisonDepthTexturein--sampled-depth-resource-only. On this driver they run cleanly without these features (measured below). For the same reason the other six focused modes are not changed: DCC clear, BGRA16 readback, push-constant bank, buffer-cache GC, 1D and standard-tile render targets.depthClampnow counts towardsm_rasterization_supportedand is enabled together with the other rasterization features. On a device without them, as here, nothing changes: device creation still succeeds and these checks are skipped.Testing
Windows 11, clang-cl 19.1.5, Release, AMD RX 9070 XT (driver 26.8.1),
main038d2257.Each of the twelve focused modes that call any check the default run guards was run under
VK_LAYER_KHRONOS_validation. That is the six changed modes plus the six unchanged ones as controls:main--image-overlap-only,--polygon-mode-only,--sampled-depth-resource-only--image-overlap-onlyimage.cpp:721, format 129 = D24_UNORM_S8_UINT, which this driver doesn't support (#930)--polygon-mode-only--sampled-depth-resource-only--compute-meta-clear-only,--image-rebind-only,--storage-mip-host-only--packed-texture-only,--push-constant-bank-only,--dcc-clear-only,--buffer-cache-gc-only,--rt1d-only,--standard-tile-rt-onlyTo find which checks need the guard, these twelve modes were first run without any guard. On this driver, only the two checks above produced validation errors or failed.
Full
ctest(53 tests) and all 107--xxx-onlymodes, this PR vsmain:compute_meta_clear_classification(abort) andgraphics_pipeline_rasterization(SEGFAULT) now pass.texture_cache_image_overlap(SEGFAULT) now stops at the D24S8 check above. The six modes changed as in the table, and every other test and mode is unchanged. CTest: 43 → 45 of 53 pass; modes: 87 → 92 of 107 exit 0.--image-rebind-only,--polygon-mode-onlyand--storage-mip-host-onlyfail again (local gate run).main9f25e3c2: the six changed modes give the same results there, with no VUIDs, and the three modes above still fail with the guard change reverted.Not tested on a GPU that supports all the rasterization features. There, the only code change is that
depthClampis now requested.The default run guards a wider group of checks than the two above. I left it as it is.
AI use (per the README's AI policy): Claude (Anthropic) traced the crash with the validation layer, measured which checks need the guard, wrote the change and ran the comparisons above on my machine. I reviewed the change and the results before updating this PR.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-10-07 18:09 UTC · original · edited 2026-10-08 12:01 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
57a919d3-5136-4afc-8915-65b766985a11📥 Commits
Reviewing files that changed from the base of the PR and between
d1a9c23f10and58967e1322.📒 Files selected for processing (1)
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
On Apple platforms, the Vulkan harness no longer requires or enables
depthClampas part of rasterization support. A new helper reports whether rasterization checks are available. Selected test paths use this check to gate rasterization-dependent checks.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
58967The reviewed scope identifies no concrete merge-blocking regression; the focused selectors retain their non-rasterization checks.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
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 helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-07 18:15 UTC · original
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42269
Run the host check independently of rasterization support.
RasterizationChecksAvailablereturnsfalseon unsupported devices. The current guard then skipsCheckBufferCacheDirtyGarbageCollection()and returns success. This check uses host memory andBufferCache; it does not require rasterization.Suggested fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-10-07 18:15 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
c39c4080-dad5-44ab-88fc-43564b01d64c📥 Commits
Reviewing files that changed from the base of the PR and between
038d2257deand a1bc385bc71ba1a194cd4533b3846aa6489b059e.📒 Files selected for processing (1)
tests/ShaderRecompilerComputeTests.cppIncluded 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-07 19:02 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
ca2196b7-dd3a-4e4f-ae8d-31a07cef1713📥 Commits
Reviewing files that changed from the base of the PR and between a1bc385bc71ba1a194cd4533b3846aa6489b059e and 47297562f3e114e2c8d3567177e33460c807f808.
📒 Files selected for processing (1)
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-07 21:57 UTC · original · reviewed
🧹 Nitpick comments (1)
ℹ️ Review info
⚙️ Run configuration
5ac69b69-6e05-43f2-b875-597717965479📥 Commits
Reviewing files that changed from the base of the PR and between b67b1a01d8bb92460f9edf1c516808bedc986039 and
d1a9c23f10.📒 Files selected for processing (1)
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Pull request closed