Commit Graph

6 Commits

Author SHA1 Message Date
28ef599619 Runtime: pick the Vulkan GPU by the harnesses' rank (native over Dozen)
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>
2026-11-22 15:27:09 +00:00
21ff2aa25e Read back indirect draws from suballocated GPU buffers 2026-11-22 11:47:02 +01:00
f704067680 Register d3d12_indirect_rt_test with ctest 2026-11-22 03:29:00 -06:00
d833221c42 d3d12_indirect_rt_test: keep the device functions, mark them [[maybe_unused]]
The previous commit removed 32 functions that the draw and RayQuery blocks
call. Those blocks are only compiled when glslangValidator generates the test
shaders, so without it they looked unused. Restore them and declare them
[[maybe_unused]] instead: C4189 goes away when the blocks are compiled out,
and nothing changes when they are compiled in.
2026-11-22 05:02:09 -03:00
2133c0d8c8 d3d12_indirect_rt_test: drop the 32 device functions it loads and never calls
The DF block loaded 35 Vulkan device functions and the test calls three
(vkGetDeviceQueue, vkDeviceWaitIdle, vkDestroyDevice). MSVC 14.52 reports each
unused one as C4189 under /W4.
2026-11-22 04:41:47 -03:00
998924fea8 feat(d3d12): add ExecuteIndirect CountBuffer and optional BLAS/TLAS/RayQueryKHR support 2026-11-22 03:04:35 -03:00