Repository navigation
TEST-468/469: GPU test tools request shaderInt64 only when a module declares Int64; vk_bindless_test honours LEONIDA_VK_DEVICE - #2647
Conversation
|
Independent Windows 11 / RTX 5070 check at
The fixtures exercised LDS compute, heap-backed fragment reads, sampled textures, typed image load/store, and bindless lookup. The address-pair translations came from #2463 (
|
|
Tested
All 190 translated modules passed |
|
Tested GPUs:
Build & CPU checks:
Direct
Not tested here: a device lacking Synthetic tests only; no game files. AI-assisted. |
|
Independent Windows dual-GPU validation for TEST-469 (AI-assisted). I built
|
|
Tested
No game files. AI-assisted. |
|
Verified f834525 on CachyOS Linux, Python 3.14.10, gcc 16.2.1, CMake 4.5.1.
Not run: any GPU execution (another worker owns the GPU), so the exit-77 paths and the LEONIDA_VK_DEVICE choice are unverified at runtime. Note: No issues found. |
f834525 to
8a833a6
Compare
|
Rebased on Retested on Apple M4 (MoltenVK 1.4.2):
AI-assisted. |
It includes no Vulkan header, but it was registered inside if(TARGET Vulkan::Headers), so a build without Vulkan headers skipped a CPU-only test. Noted by TurboSosiska304 on ItsNotRexed#2647. Checked with the Vulkan package disabled: the test builds and passes, while vk_device_pick is not configured. AI-assisted.
|
@TurboSosiska304 thanks, good catch on the CMake block. Fixed in
AI-assisted. |
|
Windows 11 integration check with On RTX 4070 Ti / 621.24 with Vulkan validation active, the FP64 fixture returned |
|
@matheuskshn thanks for the integration run with #2395, and for checking the 77 paths on SwiftShader. Both orders work:
AI-assisted. |
|
Tested
No game files. AI-assisted (Claude Code). |
It includes no Vulkan header, but it was registered inside if(TARGET Vulkan::Headers), so a build without Vulkan headers skipped a CPU-only test. Noted by TurboSosiska304 on ItsNotRexed#2647. Checked with the Vulkan package disabled: the test builds and passes, while vk_device_pick is not configured. AI-assisted.
a843887 to
c21d6db
Compare
|
Rebased onto
Other files:
Re-tested on Apple M4 / MoltenVK 1.4.2:
@crastinator thanks for the RX 6700 XT run on No game data. AI-assisted. |
It includes no Vulkan header, but it was registered inside if(TARGET Vulkan::Headers), so a build without Vulkan headers skipped a CPU-only test. Noted by TurboSosiska304 on ItsNotRexed#2647. Checked with the Vulkan package disabled: the test builds and passes, while vk_device_pick is not configured. AI-assisted.
c21d6db to
2911f68
Compare
|
@tylerstraub thanks, that covers the runner change on a device that has the features. If you have a minute, |
|
Replying to @sovljanskii. At AI-assisted. |
|
@tylerstraub right, thanks: a Workgroup add is the shared flag. The buffer path is #4984's flagged exchange module run through this head's |
Hiiva
left a comment
There was a problem hiding this comment.
Independently checked exact harness head 710679979d891a14c4c88d6eba6e3e3a15c5a5b9 on two devices that support shaderBufferInt64Atomics, using identical default/opt-in modules produced by #4984 at 5880302948f4bacae9564df926bb7b050591d239.
Windows 11, MSVC 19.44.35228, Vulkan SDK 1.4.363.0; RTX 4080 (610.62 / 32.0.16.1062) and Radeon(TM) Graphics (32.0.21043.5001). All four supported-device runs pass their dword-set and predecessor-chain oracles with zero validation errors/VUIDs. The opt-in global-atomic contention module returns zero torn pairs on both. The same exact module produces VUID 08740 with the unmodified #4984 harness, isolating this feature enablement. spirv_capability CTest also passes.
Full source identities, counts, controls, and limitations. Synthetic fixture/checker from #4964, unchanged source worktrees, no game files. This adds supported-device coverage; no unsupported physical device was tested here.
AI-assisted: yes.
|
@Hiiva thank you, that closes the gap. With your two devices that have |
|
Tested
Not run: other GPUs/vendors, Linux, the Vulkan validation layer (not installed). No game files. AI-assisted (Claude Code). |
…IDA_VK_DEVICE in vk_bindless_test TEST-468: vk_compute_test and vk_texture_test asked for shaderInt64 unconditionally, and vk_store_test, vk_harness (VKH_HEAP, mesh compute) and vk_bindless_test required it before running anything. With SHADER-423 most memory shaders no longer declare Int64, but the tools still could not run them on a device without the feature (Intel UHD/Arc). They now read the modules' leading OpCapability run first (runtime/test/spirv_capability.h, which builds without Vulkan headers), enable shaderInt64 only when a stage declares Int64 or Int64Atomics, and exit 77 with the reason when the device lacks it. spirv_capability_test covers the scan without a GPU. TEST-469: vk_bindless_test ranked every Vulkan 1.2 device and ignored LEONIDA_VK_DEVICE, so a run meant for one GPU took another; it now skips devices the filter excludes, as pick_device does, and says when the filter matched nothing. run_gpu_tests.py reported vk_store_test's 77 for cs_imgstore, cs_imgload and cs_imgload_d16 as FAIL with the last output line; it is now a SKIP quoting the "unsupported:" line. Found by richardsenra. AI-assisted.
… filter fails As the other tools do (vk_compute_test, vk_store_test, vk_harness): collect the Vulkan 1.2 devices and let pick_device apply the rank and LEONIDA_VK_DEVICE. A filter that matches nothing now exits 1 with report_no_device's message instead of 77, so a mistyped GPU name can't pass as a skipped test. Without a filter, no Vulkan 1.2 device is still 77. The approach is c4k3ss's, from ItsNotRexed#2657. AI-assisted.
It includes no Vulkan header, but it was registered inside if(TARGET Vulkan::Headers), so a build without Vulkan headers skipped a CPU-only test. Noted by TurboSosiska304 on ItsNotRexed#2647. Checked with the Vulkan package disabled: the test builds and passes, while vk_device_pick is not configured. AI-assisted.
…e device lacks vk_compute_test exits 77 with an "unsupported: ..." line when the module declares Int64 and the device has no shaderInt64 (this branch), uses Float64 without shaderFloat64, or needs OpFmaKHR. run_gpu_tests.py only read that 77 under --require-wave64, so every other compute dump reported it as a FAIL, and under --require-wave64 it was labelled "no 64-wide compute subgroup" whatever the cause (TinkerBell-90's review on an RTX 3070 with shaderInt64 hidden). check.compute_unsupported turns such an exit into a Skip that quotes the line. check.py's dump_test and compute_test use it, and so do all of run_gpu_tests.py's vk_compute_test call sites: - wavemask_check (judge_cs_dump has quoted the reason in every mode since main's 87da932, in its own words: "SKIP (<reason>)"); - the rows that judge their own output: cs_workgroup_yz, cs_lds, cs_exec64, cs_bvh, the cs_bounds group, cs_heap_init and cs_user_sgprs; - cs_cvt_f32_sat, which stops at the first refused input; - cs_f64_add, which quotes Float64 or Int64, whichever it names. The cs_fmt_* rows record check.py's result as their detail, so the tally counts a Skip detail as a skip. A 77 without a reason stays a failure, and the wave64 refusal keeps its own wording. Apple M4, MoltenVK 1.4.2, the full suite before and after (on 3faac55): - on the device itself: 152/217 passed, 58 skipped, every test unchanged; - with vk_compute_test refusing each module that declares Int64, as on a device without shaderInt64: 91 passed, 57 skipped before, and 91 passed, 120 skipped after. 62 tests go from FAIL to SKIP and none get worse. The 6 still failing (ps_ssharp, ps_vcmp*) fail on the real device too. tests/test_run_gpu_tests.py: 50 OK. Without the change, 9 of the new checks fail.
…omics The translator's 64-bit atomics are buffer atomics (ItsNotRexed#4984's --int64-atomics: *_atomic_swap_x2 on PhysicalStorageBuffer memory). vk_compute_test enabled shaderInt64 for them (Int64Atomics implies Int64) but never asked for shaderBufferInt64Atomics. A device without it (MoltenVK) failed the pipeline with -3 instead of reporting 77, and a device with it ran the module without the feature enabled. Now the feature is read from the Vulkan 1.2 features. When the module declares Int64Atomics, vk_compute_test exits 77 with "unsupported: ... declares Int64Atomics and the device has no shaderBufferInt64Atomics" if the device lacks it, and enables it otherwise. shaderSharedInt64Atomics is also enabled where the device has it, for shared-memory atomics. run_gpu_tests.py and check.py already turn such a line into a SKIP. Apple M4, MoltenVK 1.4.2: - a spirv-val-clean Vulkan 1.2 module with a 64-bit OpAtomicIAdd: before, exit 1 ("MSL currently does not support 64-bit atomics", -3); after, exit 77 with the line above; - full GPU suite: 152/217 passed, 58 skipped, every test unchanged (no fixture declares Int64Atomics yet). spirv_capability_test passes. The enabled path, on a device that has shaderBufferInt64Atomics, is not tested here. Found by the M4 run of ItsNotRexed#4984.
7106799 to
b824c20
Compare
|
Rebased onto
No duplicate definitions, no second Apple M4, macOS, MoltenVK 1.4.2, AppleClang, against a pure-
@tunczzz's Windows 11 / RTX 5070 Ti pass was of the pre-rebase head
AI-assisted. |
|
Tested b824c20 on Intel UHD Graphics 630 (CFL GT2), Mesa ANV: run_gpu_tests.py with LEONIDA_VK_DEVICE=Intel gives 167/232 passed, 63 skipped, with FAIL cs_fmt_int_narrow ("word 34: expected 0xffffffff, got 0x00000000") and FAIL cs_signed_zero_nan. cs_imgstore, cs_imgload and cs_imgload_d16 pass ("device: Intel(R) UHD Graphics 630 (CFL GT2)"), and the bindless rows pass ("ps_imgatomic: 0 of 256 texels wrong", "bindless: 16 draws read back, 0 bad pixels, largest error 0"). With LEONIDA_VK_DEVICE=NoSuchDevice, --filter cs_imgstore fails with "no Vulkan physical device matches". tests/test_run_gpu_tests.py runs 56 tests OK and the spirv_capability ctest passes. This device was not shown to lack shaderInt64, so the exit-77 path for a device without it was not exercised, and I did not run main, so I cannot say whether the two FAILs predate this PR. AI-assisted. |
|
Thanks @gertify. Neither failure comes from this PR. Both are already reported on Mesa ANV without it:
This PR doesn't change either test. Its AI-assisted. |
|
Tested The earlier two-GPU Windows reports are for
"pass" is Other runs on this head
|
shayderrr
left a comment
There was a problem hiding this comment.
Summary
Adds runtime/test/spirv_capability.h, which reads a module's declared capabilities before device creation so the standalone GPU tools enable shaderInt64 only when a stage actually declares Int64 or Int64Atomics. vk_harness, vk_compute_test, vk_texture_test, vk_store_test and vk_bindless_test now use it, returning a reason-bearing exit 77 when the device lacks a required feature. check.py learns to treat that as SKIP rather than failure, vk_bindless_test adopts the shared device filter, and a CPU-only CTest covers capability parsing.
Why merge
Most translated shaders no longer declare Int64, yet the tools blindly requested shaderInt64 and failed on Intel UHD/Arc devices before running anything. Requesting only what the module needs restores portability and turns genuine unsupported cases into explained skips.
Verdict: Approve
|
Summary Adds Why merge Most translated shaders no longer declare Verdict: Approve |
TEST-468 and TEST-469 (claim), from @richardsenra's finding. Works on
mainalone. With #2463 (SHADER-423) it lets the Int64-free modules run on devices withoutshaderInt64.What
TEST-468: request
shaderInt64only for modules that declare it.vk_compute_testandvk_texture_testasked for the feature unconditionally.vk_store_test,vk_harness(withVKH_HEAP/VKH_MESH_COMPUTE) andvk_bindless_testexited 77 without it before running anything.OpCapabilityrun before creating the device.shaderInt64only when a stage declaresInt64orInt64Atomics(which implicitly declares it).runtime/test/spirv_capability.h.vk_texture_test'sMinLodcheck moved onto it.spirv_capability_test(ctestspirv_capability, CPU only) checks it with hand-built word lists:Int64andInt64Atomicsneed the feature;OpMemoryModelis ignored;TEST-469: device selection and unsupported reporting.
vk_bindless_testranked every Vulkan 1.2 device and ignoredLEONIDA_VK_DEVICE. It now chooses throughpick_device, as the other tools do, and a filter that matches nothing exits 1 withreport_no_device's message (the approach from Tests: shaderInt64 only for modules that declare Int64; LEONIDA_VK_DEVICE in vk_bindless_test #2657).run_gpu_tests.pyreportedvk_store_test's 77 forcs_imgstore,cs_imgloadandcs_imgload_d16as FAIL, with the last output line. It now reports SKIP and quotes theunsupported:line (helper_result).tests/test_run_gpu_tests.pygets two cases: the 77 is a SKIP with its reason for all three shaders, and other exit codes still fail.docs/testing.md(GPUs without mesh shaders) now says the device needsshaderInt64only for a module that declaresInt64, and how the tools decide.Tested
On an Apple M4 (MoltenVK 1.4.2, macOS, one GPU, with
shaderInt64), Ninja RelWithDebInfo build, no warnings:run_gpu_tests.py, tools frommain4947579run_gpu_tests.py, this branchrun_gpu_tests.py, this branch merged with #2463ps_tex,ps_imgatomic(vk_bindless_test),cs_imgstore,cs_imgloadandcs_imgload_d16(vk_store_test).ps_ssharp("point bias +1") fails the same way withmain's tools. It is the known MoltenVK sampler result (SHADER-268, also seen on an M2), unrelated to this change.Int64and ran withshaderInt64off. 14 still declare it. Without SHADER-423: 64-bit buffer addresses as 32-bit pairs, without Int64 #2463 all 117 do.vk_bindless_testwithLEONIDA_VK_DEVICE="Apple M4"passesps_tex; withnomatchit exits 1 (no Vulkan physical device matches).spirv_capabilityandvk_device_pickpass.tests/test_run_gpu_tests.pypasses, 32 tests.test_docs_links,test_docs_list_itemsandtest_docs_repo_pathspass.Not tested here:
shaderInt64, which is the point of TEST-468;@richardsenra's Intel UHD + RTX 3050 laptop has both. A run of
scripts/run_gpu_tests.pywith #2463 merged andLEONIDA_VK_DEVICEset to the Intel GPU would confirm it.No game files. AI-assisted.