Commit Graph

11 Commits

Author SHA1 Message Date
ba626820ec Integrate post-story-load memory, queue and Vulkan runtime changes
Preserve physical window aliases across remaps, order console list values,
and replay bounded indirect graphics with captured draw state. Coordinate
pipeline lifetime, texture refresh and queue teardown. Add synthetic CPU
and GPU coverage for the integrated paths.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
2026-11-25 03:44:43 -06:00
f4fc7623c0 test: compute the indirect RT scratch size without nested std::max (TEST-INDIRECT-RT-ARENA) 2026-11-24 21:14:33 +01:00
5ea96b8591 runtime: support KHR CopyRaytracingAccelerationStructure (CLONE/COMPACT) and COMPACTED_SIZE postbuild 2026-11-23 20:56:28 +01:00
77f00b6027 d3d12: refuse GPU-written KHR instance lists before CPU staging
Only CPU-writable heaps expose a host pointer to replay, so DEFAULT and READBACK pointer lists are refused as unsupported instead of being read from possibly stale mapped bytes. Reuse completed staging buffers and write translated addresses directly. Adds a GPU-copy-produced placed-DEFAULT regression with a negative control.

AI-assisted (OpenCode)
2026-11-23 03:24:21 +03:00
cc4b374499 d3d12: translate ARRAY_OF_POINTERS instances on the KHR path
KHR TLAS builds hardcoded arrayOfPointers = VK_FALSE and passed the guest's console-VA pointer list straight to Vulkan. Carry DescsLayout into the recorded build, validate each pointer, stage a copy with heap_base added into a device-addressable buffer, and use it as the build input. The guest input is not modified and GPU-written pointer lists are refused. Adds ARRAY and ARRAY_OF_POINTERS RayQuery coverage plus a null-entry refusal check.
2026-11-23 02:12:09 +03:00
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