tests: start the Vulkan harness without byte-granular robust buffer access #2038
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!2038
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2038"
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-31 22:35 UTC · original
Nawid3333:fix/harness-robust-optional→main· +73 −13 · 1 files · 3 commits · openSummary
Fixes #2036. Since
ee034be4bthe Vulkan harness ofshader_recompiler_compute_testsrequiresrobustStorageBufferAccessSizeAlignment == 1and always requestsVK_EXT_pipeline_robustness, so it stops before the first case on AMD GPUs: the drivers here report an alignment of 4 and do not list the extension (pipeline robustness is core in Vulkan 1.4, the harness creates a 1.3 instance). This change uses per-pipeline robust buffer access only where the device supports it and skips only the robust buffer cases elsewhere.Change
VK_EXT_pipeline_robustnessin the device extension list. Robust pipelines are used when the extension is listed androbustBufferAccess2,pipelineRobustnessand an alignment of 1 are supported.[host] RobustBufferPipelines unavailable, robust buffer cases will be skipped, like the rasterization notice, andRunCasereports the cases whose profile uses robust buffer access as skipped.computeDerivativeGroupQuadsis optional in the same way (second commit; RADV reports it as false on gfx11 and gfx12, see lordra9-svg's comment below): the harness requests it, andVK_KHR_compute_shader_derivatives(third commit), only where the device lists the extension and has the feature, prints[host] ComputeDerivativeQuads unavailable, compute derivative cases will be skippedotherwise, andRunCaseskips the cases whose compiled program uses compute derivatives (ImageSampleAndGatherin the default list).Tests
On a Radeon RX 9070 XT (AMD driver 26.10.1) and an AMD Radeon integrated GPU (driver 25.10.42), Windows 11:
--robust-buffer-only:CheckedBufferTailAccessesWave32andCheckedBufferTailAccessesWave64pass (the shader bounds-check path these GPUs use in games), the five robust buffer cases are reported as skipped;--buffer-cache-gc-onlypasses;--robust-buffer-onlyunderVK_LAYER_KHRONOS_validation: no validation messages.Second commit, on the RX 9070 XT with
--image-sample-offset-only: all 13 cases pass. WithcomputeDerivativeGroupQuadsforced to false after the feature query (a local change, not in this PR), the branch without the second commit stops withVulkanHarness failed at dispatch: image gather, MinLod or compute derivative quads are not supported; with it,ImageSampleAndGatheris reported as skipped and the other 12 cases pass. The same with the extension removed from the harness's copy of the device extension list (third commit).Notes
GpuSelectedFormattedRgba16Store(expected0xc0003c04, got0xc0003c03: the float16 rounding of formatted stores; #1588, which would have changed that rounding, was closed without being merged), so the checks above use the--*-onlygroups.AI use: drafted with AI assistance (Claude Code); verified and tested by me.
@coderabbitai[bot] on GitHub · 2026-10-31 22:42 UTC · original · edited 2026-11-25 17:11 UTC
Walkthrough
The Vulkan harness now detects robust-pipeline support from extension availability, feature bits, and storage-buffer alignment. It configures pipeline robustness only when supported. It also detects compute derivative-quad support and requests related features only when available. Compute cases that require unavailable capabilities are skipped. The test runner reports skipped compute cases separately from skipped graphics cases.
Suggested reviewers:
nmzikChange: Other · Severity of issue fixed: Medium
Merge Risk:
Low · previous review
e4b4cThe Vulkan test harness now starts on more devices, but a device that does not list the compute-derivatives extension would still abort at device creation before any case runs. The impact is limited to test setup on uncommon drivers. Gate the extension on availability before merging, or accept the limitation explicitly.
Pre-merge checks:
3 ·
1
e4b4cbe, titled 'tests: skip only the compute derivative cases without q…#2036] requires that byte-granular robust buffer cases run only when robustStorageBufferAccessSizeAlignment is 1, that the harness not request VK_EXT_pipeline_robustness when the driver does not list…Full details: Title check
Explanation
The title names the main change: the Vulkan compute test harness now starts without requiring byte-granular robust buffer access. The changeset matches this. It adds detection of pipeline robustness and skips robust buffer cases when unsupported. The title is specific and concise, and it fits the objectives, which also cover the related derivative-quad handling. It is 74 characters, which is acceptable.
Full details: Description check
Explanation
The description is related to the changeset. It explains the cause (robustStorageBufferAccessSizeAlignment requirement and unconditional VK_EXT_pipeline_robustness request), the fix (detect extension and features, use robust pipelines only when supported, skip robust buffer cases otherwise), and the testing done on AMD GPUs. It also lists known follow-up failures tied to other issues.
Full details: Linked Issues check
Explanation
[
#2036] requires that byte-granular robust buffer cases run only when robustStorageBufferAccessSizeAlignment is 1, that the harness not request VK_EXT_pipeline_robustness when the driver does not list it, and that other cases use the shader bounds-check path. The earlier whole-PR review (merge base93cce66to head 7effce5, file tests/ShaderRecompilerComputeTests.cpp) found this gating in place: robust pipelines require the extension to be listed, robustBufferAccess2, pipelineRobustness and alignment 1. Otherwise the harness prints a notice, and RunCase skips only robust buffer cases. The commit history shows the later commite4b4cbechanges only the compute-derivative handling, so the robust gating is not expected to have changed. The current diff could not be read in this review, so that point rests on commit subjects and the prior review. The author's AMD test runs are not independently verified. The Vulkan 1.4 core query path in the issue is a suggested direction, not an acceptance condition.Full details: Out of Scope Changes check
Explanation
The prior review found only tests/ShaderRecompilerComputeTests.cpp changed, and only robust-buffer gating hunks. The new commit
e4b4cbe, titled 'tests: skip only the compute derivative cases without quad derivatives', adds compute-derivative-quad detection (DerivativeQuadsSupported) and skips compute cases that need quad derivatives. The raw summary describes this change. The objectives say it responds to a Linux/RADV reviewer comment. Issue#2036concerns Windows device setup and does not mention derivatives. The current PR description does not mention this change. The diff hunks could not be read, so I cannot confirm that the change stays test-only and gated on device capability. No emulator runtime code is shown in the summary. The#1588,#1811and#2010issues are not attempted.Resolution
Update the PR description to state the derivative-quad change and its reason, or confirm it belongs in this PR. Make the derivative-quad diff readable so the scope can be checked. Confirm that the change only affects the test harness.
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
@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@coderabbitai[bot] on GitHub · 2026-11-01 16:46 UTC · original · edited 2026-11-01 18:23 UTC
Include compute skips in the final summary.
When this branch skips a case, the full run can still report
all cases passed.SkippedCaseCount()tracks only graphics skips. (raw.githubusercontent.com)Count compute skips separately and report them in the final summary. The exit status can remain successful.
✅ Addressed in commit 62b48dc
@coderabbitai[bot] on GitHub · 2026-11-01 16:46 UTC · original · reviewed
Actionable comments posted: 1
a321258f-0f3b-45cb-a8c0-a3bb1625609eReviewing files that changed from the base of the PR and between 00024caa002cf68848a6be2147cc2506c8d058fe and fab15b180fc15124127b8c064dcfb4ce0807e1f9.
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@Nawid3333 on GitHub · 2026-11-01 18:11 UTC · original
Done in 62b48dc9b: compute cases skipped for missing byte-granular
robustBufferAccess2are counted, and the summary printsN compute cases skippednext to the graphics count. The exit status stays 0.@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@coderabbitai[bot] on GitHub · 2026-11-01 18:19 UTC · original · edited 2026-11-01 18:39 UTC
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 32857
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42394
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 41547
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 16037
Run
RobustBufferAtomicOutOfRangewith the checked profile.RobustBufferAtomicOutOfRangerequiresOpULessThan, so it does not need byte-granular pipeline robustness. Its currentRobustBufferProfileassignment makesRunCaseskip it on such devices. Remove that assignment so the case uses the default checked profile and remains covered.Suggested fix
@coderabbitai[bot] on GitHub · 2026-11-01 18:19 UTC · original · reviewed
Actionable comments posted: 1
ea3a5607-97f3-416d-a75a-287d2bb8ec2eReviewing files that changed from the base of the PR and between fab15b180fc15124127b8c064dcfb4ce0807e1f9 and 62b48dc9bbf7c2c041e3d3fdb85706f9b0ebad7a.
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@coderabbitai[bot] on GitHub · 2026-11-01 18:24 UTC · original
@Nawid3333 Thanks for the fix in
62b48dc9b. The separate compute skip count and summary address this finding. Keeping exit status 0 is appropriate.If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
Review thread resolved.
You are interacting with an AI system.
@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@Nawid3333 on GitHub · 2026-11-01 18:38 UTC · original
I'd keep the profile. The case comes from
ee034be4band checks that a buffer atomic keeps its explicit bounds check under the robust profile: with the default profile every access is bounds-checked, soOpULessThanwould be there for another reason and the case would no longer test that. TheOpULessThancheck runs inCompileCase(CheckSpirvEmission), before the skip inRunCase, so it still runs on devices without byte-granularrobustBufferAccess2; only the dispatch is skipped.@ -25460,0 +25505,4 @@!vulkan->RobustPipelinesSupported()) {std::printf("[compute] %-32s skipped, no byte-granular robustBufferAccess2\n", test.name);vulkan->SkipComputeCase();return;@coderabbitai[bot] on GitHub · 2026-11-01 18:39 UTC · original
@Nawid3333 You're right.
RobustBufferProfileis essential to the regression test: it checks that atomics retain explicit bounds checks under the robust profile. Switching to the default checked profile would no longer test that behavior.CompileCaserunsCheckSpirvEmissionbefore theRunCaseskip, so theOpULessThanassertion remains covered when dispatch is unavailable. Keep the profile assignment. I withdraw this finding.Review thread resolved.
You are interacting with an AI system.
@lordra9-svg on GitHub · 2026-11-25 13:01 UTC · original
Verified this branch on Linux/RADV (RX 7800 XT, Mesa 25.3.6, Vulkan 1.4.328). The robust-buffer
stop is gone:
but the harness still aborts before the first compute case:
The missing feature is
computeDerivativeGroupQuads. RADV reports it false for both gfx11/gfx12devices, while
shaderImageGatherExtendedandshaderResourceMinLodare true:(RX 7800 XT and Raphael iGPU,
vulkaninfo.)So the suite still cannot start on Linux AMD: the robust-pipeline skip this PR adds has a matching
requirement at
tests/ShaderRecompilerComputeTests.cpp:24871, which aborts the whole harness beforeany case runs. If the Linux path is in scope, the derivative-quad cases need the same treatment as
the rasterization and robust-buffer cases (run the linear cases; skip only the quad-dependent ones,
such as
ComputeDerivativesDevice). If #2036 is meant to be Windows-only, it would help to statethat in the PR.
Repro: build
shader_recompiler_compute_testson this branch and run it without arguments.@coderabbitai[bot] on GitHub · 2026-11-25 16:55 UTC · original · edited 2026-11-25 17:11 UTC
On
tests/ShaderRecompilerComputeTests.cppline 25000 (outdated):Make the derivative extension optional with the feature.
If a device does not advertise
VK_KHR_compute_shader_derivatives, setting this feature to false does not enable the fallback.device_extensionsstill requests the extension unconditionally.vkCreateDevicethen returnsVK_ERROR_EXTENSION_NOT_PRESENT, before any non-derivative case runs. (raw.githubusercontent.com)Check extension availability and conditionally add the extension and its feature structure. Preserve the current path when quad support is available.
✅ Addressed in commit
3c61f70@coderabbitai[bot] on GitHub · 2026-11-25 16:55 UTC · original · reviewed
Actionable comments posted: 1
e02ec4d9-d540-43e1-b2d4-7f130ab8acd8Reviewing files that changed from the base of the PR and between 7effce5ddebb497ce8f36e38d418a8b294e9b83c and
e4b4cbe4a0.tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@Nawid3333 on GitHub · 2026-11-25 17:31 UTC · original
@lordra9-svg Thanks, that was the next stop: the harness required
computeDerivativeGroupQuads.e4b4cbe4amakes it optional like the robust buffer path: without quads it prints aComputeDerivativeQuadsnotice, andRunCaseskips the cases whose compiled program uses compute derivatives (ImageSampleAndGatherin the default list). With quads forced off in the harness here (--image-sample-offset-only), the branch without this commit stops at the harness with your message, and with it that case is skipped and the other 12 pass. With quads,ImageSampleAndGatherruns as before. The branch is now three commits on current main (93cce6656); the third requests the extension itself only where it is listed (CodeRabbit's point below).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.