Commit Graph

7 Commits

Author SHA1 Message Date
3a42a9e25b runtime/test/check_sparse_queue_family.py: add argv support, LF layer settings, sorted trace globs, and OSError guard 2026-11-26 20:59:22 +08:00
b75d669b0a check_sparse_queue_family: mirror queue_families.h order and validate full property dump
Address review feedback on #7268:
- Mirror runtime/src/queue_families.h (pick_queue_families followed by
  sparse_capable_queue_families) in exact selection order: pick the first
  non-graphics async compute and fine-grained (1x1x1) DMA transfer families
  first, then fall back to the graphics family if the chosen family lacks
  VK_QUEUE_SPARSE_BINDING_BIT. Also read the graphics family index from
  vkCreateDevice's pQueueCreateInfos[0] when present.
- Validate vkGetPhysicalDeviceQueueFamilyProperties dumps strictly against
  pQueueFamilyPropertyCount and contiguous indices 0..count-1 so incomplete
  or truncated entries are never silently dropped.
- Add synthetic unit tests covering non-sparse compute/DMA ahead of sparse
  families and malformed/incomplete queue-family dumps (29/29 pass).

AI-assisted.
2026-11-23 18:47:01 +01:00
4ac98342f2 check_sparse_queue_family: skip CONCURRENT contract on single-family GPUs
DeviceState::share() (runtime/shims/d3d12_vulkan_device.cpp) only sets
VK_SHARING_MODE_CONCURRENT when the device has >= 2 queue families; Vulkan
VUID-VkBufferCreateInfo-sharingMode-00914 forbids CONCURRENT with <= 1
family. On GPUs that expose only one sparse-capable graphics/compute/transfer
queue family (such as Intel UHD Graphics 770 Xe-LP, whose second family is
VK_QUEUE_VIDEO_DECODE_BIT_KHR only), d3d12_sparse_queue_family_test passes
with valid EXCLUSIVE sparse buffers and zero Vulkan validation errors, but
check_sparse_queue_family.py failed expecting CONCURRENT with >= 2 families.

Inspect vkCreateDevice and the same physicalDevice's
vkGetPhysicalDeviceQueueFamilyProperties in the api_dump trace (mirroring
runtime/src/queue_families.h). When the physical device genuinely exposes
only one sparse-capable family and vkCreateDevice created one family, still
validate that every sparse VkBuffer uses EXCLUSIVE with count=0 and that the
Khronos validation pass reports zero errors, then exit 77 (CTest skip).
Multi-family physical devices remain strictly enforced even if vkCreateDevice
erroneously drops to one family.
2026-11-23 17:22:22 +01:00
9b72d0d2cc tests: check sparse buffer sharing evidence within each API dump record (#6756)
Squash-merged after diff review of PR #6756 - tests: verify sparse queue-family indices within each buffer record
2026-11-23 09:55:11 -06:00
8c8c1de1c3 check_sparse_queue_family: run api_dump and validation apart (TEST-1089) (#4900)
Squash-merged after review of PR #4900 - check_sparse_queue_family: run api_dump and validation apart (TEST-1089)
2026-11-23 08:11:09 -06:00
e17cf25695 Fix what the round-43 merges broke (runtime build and ctest)
- replay_cpu_bench: #3693 moved a draw's render targets and vertex buffers into Draw::views (D3D-391); the bench
  builds a DrawViews block instead of writing the old inline arrays.
- xgameruntime_user_test links file_system.cpp, which now defines rt::fs::game_dir that xgameruntime.cpp calls.
- check_sparse_queue_family: a vkCreateInstance refused because the api_dump/validation layer is not installed is
  the documented "layer absent" skip (77), not a failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:52:59 -05:00
389f949bc9 fix: share sparse D3D12 buffers across queue families and require sparse-capable queues 2026-11-22 16:13:00 -05:00