docs/testing.md says a module that needs OpFmaKHR exits 77 (a SKIP) on a
device without VK_KHR_shader_fma, but only the fragment module was checked
in vk_harness, and vk_texture_test, vk_sampler_test and vk_bindless_test
never refused the vertex module (vs_ids carries FMAKHR). Under
LEONIDA_FMA=khr such a pair failed vkCreateGraphicsPipelines with -13 and
run_gpu_tests.py reported a FAIL.
ShaderFma::accepts_file() checks one module file. vk_harness (vertex module,
VKH_MESH_COMPUTE module), vk_texture_test, vk_sampler_test and
vk_bindless_test use it for every stage; vk_sampler_test also enables the
feature when the device has it, like the others. judge_cs_dump treats exit 77
with an "unsupported:" line as a skip for the non-wave64 dumps too
(cs_w32_new_ops).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpL5aWzXuYTbhn6b52
vs_ids.spv reads BaseVertex / BaseInstance for the zero-based v0 / v3 and so
declares the DrawParameters capability. vk_harness and vk_texture_test enable
VkPhysicalDeviceVulkan11Features::shaderDrawParameters for it; vk_sampler_test
did not, so every ps_ssharp case created a module that breaks
VUID-VkShaderModuleCreateInfo-pCode-08740 (reported by VK_LAYER_KHRONOS_validation).
Query the feature with the Vulkan 1.2 ones and enable it when the device has it,
as vk_harness does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With LEONIDA_PC_TAIL_UBO=1, build.py and run_gpu_tests.py translate with --pc-tail-ubo, and the test
programs (vk_compute_test, vk_store_test, vk_harness, vk_texture_test, vk_sampler_test, vk_bindless_test)
declare and push 128 bytes and, when a stage declares set 1, bind the tail block there
(runtime/test/vk_pc_tail.h: a host-visible buffer with one slot per dispatch or draw, bound as a dynamic
uniform buffer). vk_harness refuses --mesh-compute with the flag (exit 77): mesh_compute_vs.py's vertex
shader still reads its address from push constants. Without the variable nothing changes.
Step 2 of the uniform-buffer tail claimed in #1902.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runtime's standalone device (d3d12_vulkan_device.cpp) still took
"the first usable device, replaced by every later discrete GPU". #915
fixed that rule in the test harnesses because Mesa's Dozen (Microsoft
vendor 0x1414, "Microsoft Direct3D12 (<gpu>)") reports a discrete GPU, so
on a PC with the OpenCL/OpenGL/Vulkan Compatibility Pack the runtime
could run on the Vulkan-on-D3D12 wrapper while the tests used the native
driver. Even without Dozen, on a two-dGPU PC the runtime took the last
GPU and vk_test_device.h the first.
- runtime/src/vulkan_device_filter.h: vulkan_device_rank() (native over
Microsoft's layers, then discrete > integrated > virtual > CPU), with
the device type as an int so the header stays Vulkan-free.
- d3d12_vulkan_device.cpp: the first usable device of the highest rank.
- vk_device_pick.h: device_rank forwards to it (static_assert on the
VkPhysicalDeviceType values).
- d3d12_indirect_rt_test, dxgi_swapchain_test, vk_image_fuzz,
vk_sampler_test had the old loop and ignored LEONIDA_VK_DEVICE: they
now filter and rank like the rest, and an unmatched filter fails
instead of skipping.
- vulkan_device_filter_test: the rank order; docs/testing.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vk_sampler_test binds a 128x128 two-level texture with the VkSampler from
vulkan_sampler(decode(S#)) and the view range from decode(T#). ps_ssharp
samples it with image_sample_lz and image_sample. check.py judges eight
S#/T# cases per pixel against levels worked out from the S# and T# bits.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>