Skip to content

Vulkan validation under Wine: request the layer only when it is listed, and prove it is active instead of reporting 0 errors - #4973

Closed
tedin7 wants to merge 8 commits into
ProjectLeonida:mainfrom
tedin7:vk-validation-wine
Closed

tedin7 wants to merge 8 commits into
ProjectLeonida:mainfrom
tedin7:vk-validation-wine

Conversation

@tedin7

@tedin7 tedin7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #4933 (comment)

What and why

With LEONIDA_VK_VALIDATION=1, a guest run through gta6rt --run under Wine could not get a Vulkan device:
D3D12XboxCreateDevice returned 0x80004005 ([rt] d3d12: vkCreateInstance (Vulkan 1.3) failed), for example with
tiny_frame (#3488). Without validation the same runs pass.

Cause: Wine's vulkan-1.dll lists no instance layers and refuses every explicit one. In Wine 11.0,
convert_instance_create_info in dlls/win32u/vulkan.c
does if (info->enabledLayerCount) { FIXME("Loading explicit layers is not supported!\n"); return VK_ERROR_LAYER_NOT_PRESENT; }
(WINEDEBUG=fixme+vulkan shows it, then Failed to create vulkan instance, res -6). create_vulkan_device_standalone
asked for VK_LAYER_KHRONOS_validation whenever the variable was set, so the whole device failed. The layer itself
works on this driver: loaded by the host's loader through VK_INSTANCE_LAYERS, it runs inside the Wine process.

Four commits:

  1. The device asks for the layer only when vkEnumerateInstanceLayerProperties lists it.

  2. (After review.) VkValidationFeaturesEXT (synchronization validation) goes on the instance only where a layer is
    there: with VK_EXT_validation_features enabled when the loader lists the layer, or, when it does not, only after a
    throwaway instance shows that a validation layer is active. That proof: a second debug messenger with no severity
    bits breaks VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-requiredbitmask, which a layer reports and the
    loader alone accepts. Data on what Wine forwards:

    • Wine passes no VK_* variable into the Windows environment (wine cmd /c set with VK_INSTANCE_LAYERS set shows
      only LEONIDA_VK_VALIDATION), so the runtime cannot read VK_INSTANCE_LAYERS.
    • Wine lists no layer extension (VK_EXT_validation_features is not among the host instance extensions in a
      WINEDEBUG=+vulkan trace), so it cannot be enabled by name there.
    • Wine does pass VkValidationFeaturesEXT on: the host layer's CURRENT-VALIDATION-ENABLED report lists
      "Synchronization" for the device's instance, and not without the structure.

    The runtime says on stderr which way it went, and "validation is off" when no layer is active. A failing
    vkEnumerateInstanceLayerProperties is reported with its VkResult.

  3. vk_test_device.h (the d3d12_*_test programs and others): the same choice. Every device then makes one
    deliberately invalid call (a buffer with no usage bits) that must come back as a validation error; otherwise the
    test fails with "validation is not active". A test can't report 0 validation errors from a layer that was not there.

  4. The probe's own error is counted but not printed, so it can't match FAIL_REGULAR_EXPRESSION "Validation Error;VUID-". d3d12_indirect_rt_test, which makes its own instance, probes the same way.

New tests:

  • run_tiny_frame_validation (check_tiny_frame.py --validation) runs tiny_frame with LEONIDA_VK_VALIDATION=1,
    VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and the layer's information messages on. It passes only when the
    layer's own CURRENT-VALIDATION-ENABLED report, with Synchronization, shows the layer was active in that process.
    It fails on any Validation Error line and exits 77 when no layer was active. It is its own process because the
    layer is chosen when a process starts, and tiny_frame is the cheapest guest.
  • vk_validation_probe (check_validation_probe.py) runs d3d12_com_test twice: with the layer (the probe must be
    reported and the test pass) and with it disabled in the loader (the test must fail with "validation is not active").

How to validate under Wine (also in docs/testing.md):

cd runtime/build/windows/fixtures/game/RelWithDebInfo
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation LEONIDA_VK_VALIDATION=1 LEONIDA_D3D12=vulkan \
  xvfb-run -a wine ../../../gta6rt.exe --run tiny_frame.exe --trace-d3d12

(Set VK_LAYER_PATH to the SDK's share/vulkan/explicit_layer.d when the layer isn't installed system-wide.)

The hang at device creation reported together with this was not about validation. A Wine program started under a new
xvfb-run -a while the prefix's wineserver and explorer.exe from the previous run are still alive (on that
run's closed display) can block in its first Vulkan call (wine_vk_init, winevulkan/loader.c:348 in a
winedbg backtrace) and never return. With Wine 11.0, 20 runs of d3d12_com_test back to back, each under its own
xvfb-run -a and without validation: the first passed and the other 19 hung. The same 20 runs with
wineserver -k before each all passed. docs/testing.md has the way out. The scripts that stop the prefix themselves
are in a separate PR. No Wine bug report found for it.

Tested

Wine 11.0, RTX 5080 (NVIDIA 580.65.06), Vulkan SDK 1.4.363.1 layer on the Linux host, clang-cl xwin cross-build:

  • check_tiny_frame.py --validation --runner wine on main: FAIL (D3D12XboxCreateDevice failed, hr 0x80004005).
    With this branch: OK. With VK_INSTANCE_LAYERS naming a layer that is not installed: SKIP (77) and "validation is
    off" on stderr. The first commit alone passed that case, which was review item 1.

  • xvfb-run -a ctest -R 'run_tiny_frame|vk_validation_probe': 3/3 pass.

  • The command above: tiny_frame: OK, 0 Validation Error lines, the runtime's "a validation layer is active" line.

  • 86 tests (d3d12_*, vk_*, allocator_proxy, queue_proxy, dxgi_device, xbox_present, depth24*) under
    Wine, ctest -j4, with and without validation:

    • The deliberate invalid call was reported in 64 tests, on 88 devices. No device said "validation is not active",
      apart from the negative half of vk_validation_probe.
    • Without validation: 65 passed, 14 skipped, 7 failed. With validation: 65 passed, 13 skipped, 8 failed. The same 7
      fail either way under Wine (d3d12_descriptor, d3d12_fence_timing, d3d12_heap_properties,
      d3d12_indirect_dispatch_count, d3d12_private_data, d3d12_residency, d3d12_subresource_copy), and none of
      them shows a validation error.
    • vk_sync_validation (skipped without validation) passes: synchronization validation reports a write-after-write
      hazard through Wine.
    • d3d12_queue_handover fails with validation: VUID-vkCmdDraw-None-09600, an image expected in GENERAL is
      still UNDEFINED. All of them come from the test's host pass, which under Wine is vkd3d on the same host layer;
      the Vulkan-layer pass is clean (see Not covered).
    • d3d12_indirect_rt passes with 0 validation errors (before commit 4: "not installed").
  • Review follow-ups (commit 5), on the pod with the rebuilt tree, LEONIDA_VK_VALIDATION=1 and
    VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

    • vk_sync_validation, d3d12_com, vk_validation_probe, d3d12_indirect_rt and run_tiny_frame_validation
      pass.
    • Without VK_INSTANCE_LAYERS, d3d12_com_test now stops before its instance with "validation is not active: a
      deliberate invalid call on a throwaway instance was not reported".
    • tests/test_check_tiny_frame.py (18) and the new tests/test_check_validation_probe.py (6) pass. Against
      commit 4, these fail and pass now:
      • an empty check list;
      • an error or a bad exit code with no layer report;
      • another vkCreateInstance failure, in either run;
      • a listed layer that reports nothing.

Not covered

  • Windows with and without the Vulkan SDK was not run. With the SDK, the loader lists the layer, the explicit path is
    unchanged, and the probe runs on top. Without the SDK, the device is now created with "validation is off", where
    before it failed with 0x80004005. The GPU tests then fail with "validation is not active", as they failed before
    with "not installed".
  • check_validation_probe.py's negative half relies on VK_LOADER_LAYERS_DISABLE hiding the layer. That was checked
    only through Wine's host loader.
  • d3d12_queue_handover's validation errors (above) are not fixed here. They are vkd3d's: it puts a new texture's
    first layout transition into the first command list recorded that names it, not the first one executed
    (d3d12_command_list_track_resource_usage, libs/vkd3d/command.c). A separate change skips that test's host pass
    under Wine, as the other host comparisons do (host_wine.h).
  • dxgi_swapchain_test, vk_bindless_test, vk_descriptor_bench and vk_image_fuzz make their own instances
    with the layer named and were not changed. They are Linux programs, or not run under Wine here.

AI-assisted (Claude Code). No game files.

…ailing it

Wine's vulkan-1.dll lists no instance layers and refuses every explicit one
(win32u/vulkan.c: "Loading explicit layers is not supported!",
VK_ERROR_LAYER_NOT_PRESENT). create_vulkan_device_standalone asked for
VK_LAYER_KHRONOS_validation whenever LEONIDA_VK_VALIDATION=1, so under Wine
vkCreateInstance failed and D3D12XboxCreateDevice returned 0x80004005.

The device now asks for the layer only when vkEnumerateInstanceLayerProperties
lists it. Otherwise it says why on stderr and is created without it; the
synchronization-validation request stays in the chain, so a host layer loaded
through VK_INSTANCE_LAYERS before wine runs with sync validation, as on Windows.

run_tiny_frame_validation (check_tiny_frame.py --validation) runs tiny_frame
with LEONIDA_VK_VALIDATION=1 and VK_INSTANCE_LAYERS set and fails on a
validation error. docs/testing.md says how to validate under Wine.
…here a layer is there

Review of the previous commit:
- run_tiny_frame_validation passed where no layer validated anything. It now
  turns on the layer's information messages and passes only when the layer's
  own CURRENT-VALIDATION-ENABLED report (with Synchronization) shows it was
  active in that process; it exits 77 when no layer was active.
- VkValidationFeaturesEXT went on the instance with no layer to read it. It
  now goes there with VK_EXT_validation_features when the loader lists the
  layer, or, when it does not (Wine), only after a throwaway instance shows a
  validation layer is active: a second debug messenger with no severity bits
  breaks VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-requiredbitmask,
  which a layer reports and the loader alone accepts. Wine passes no VK_*
  variable into the Windows environment, so VK_INSTANCE_LAYERS cannot be read,
  and lists no layer extension, so VK_EXT_validation_features cannot be named;
  it does pass the structure on (the host layer reports Synchronization).
- A failing vkEnumerateInstanceLayerProperties is reported with its VkResult.
- CMake says why the validation run is a process of its own.

docs/testing.md: the stderr lines, and the Wine hang that looked like a hang at
device creation (a new xvfb-run while the prefix's wineserver and explorer.exe
are still on the previous run's closed display), with wineserver -k as the way
out.
…o under Wine

vk_test_device.h asked for VK_LAYER_KHRONOS_validation and failed with "not
installed" when the loader did not list it, so under Wine (whose loader lists
no layers) no d3d12_*_test could run with LEONIDA_VK_VALIDATION=1. It now asks
for the layer when listed, and otherwise relies on one enabled from outside
(VK_INSTANCE_LAYERS before wine loads the host's) with the same messenger and
synchronization-validation request.

Either way, every device makes one deliberate invalid call after creation (a
buffer with no usage bits, VUID-VkBufferCreateInfo-usage-requiredbitmask) and
must see it reported as a validation error; the probe's error is taken back off
the count. If it is not reported, the device fails with "validation is not
active", so a test never reports 0 validation errors from a layer that was not
loaded.

vk_validation_probe (check_validation_probe.py) runs d3d12_com_test with the
layer available (the probe must be reported and the test pass) and with it
disabled in the loader (the test must fail and say validation is not active).
…rect_rt_test probes too

vk_test_device.h printed the probe's deliberate error, so a test whose output
must not contain "Validation Error" or "VUID-" (FAIL_REGULAR_EXPRESSION) would
fail on it. It is still counted (and taken back off) but no longer printed.

d3d12_indirect_rt_test makes its own instance and still stopped with "not
installed" under Wine. It now asks for the layer only when the loader lists it,
and otherwise relies on one enabled from outside; either way a second debug
messenger with no severity bits (VUID-VkDebugUtilsMessengerCreateInfoEXT-
messageSeverity-requiredbitmask) must be reported, or the test fails with
"validation is not active".
…ey cannot see

Review follow-ups for the validation-under-Wine change.

- check_tiny_frame --validation: a CURRENT-VALIDATION-ENABLED report whose
  list of checks is empty or lacks Synchronization is a failure (it was
  taken as Synchronization). A run without the report is skipped only when
  nothing else is wrong; a validation error line or a bad exit code fails.
- check_validation_probe: "not installed" (skip) is now only the loader not
  listing the layer while nothing reports the probe, or vkCreateInstance
  failing with VK_ERROR_LAYER_NOT_PRESENT. A listed layer that reports
  nothing, or another vkCreateInstance failure, fails in either run.
- vk_test_device.h: with the layer unlisted, a throwaway instance first
  checks that an outside layer reports (a messenger with no severity bits),
  and VkValidationFeaturesEXT goes on the instance only after that; without
  it the device fails at once with "validation is not active".

New tests: tests/test_check_validation_probe.py, and validation cases in
tests/test_check_tiny_frame.py.
@DenRakEiw

Copy link
Copy Markdown
Contributor

Tested a59c29df on NVIDIA GeForce RTX 5090 (Blackwell, driver 32.0.16.1088) and AMD Radeon(TM) Graphics (iGPU, driver 31.0.22044.1), Windows 11, MSVC 19.44 / Ninja / Vulkan SDK 1.4.363.0 (LEONIDA_VK_VALIDATION=1, no game files): pass.

  • Trial-merged onto origin/main (3faac557): clean; d3d12_indirect_rt_test built cleanly.
  • RTX 5090: ctest -R "^d3d12_indirect_rt$" -V -> 1/1 passed (0.52s, validation probe active, 0 Vulkan validation errors).
  • AMD Radeon iGPU (LEONIDA_VK_DEVICE=AMD): ctest -R "^d3d12_indirect_rt$" -V -> 1/1 passed (validation probe: reported, validation is active, ExecuteIndirect + BLAS/TLAS + RayQueryKHR PASS, 8.69s, 0 Vulkan validation errors).
  • python -I tests/test_check_validation_probe.py: 6/6 OK; python -I tests/test_check_tiny_frame.py: 18/18 OK.

AI-assisted (Gemini 4 Neon).

@KubickNubick

Copy link
Copy Markdown

Tested a59c29d merged with main 3faac55 (clean merge) on native Windows 11 Pro 26300, MSVC 19.51, Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0 (its VK_LAYER_KHRONOS_validation): pass, no regression on the native loader path. One GPU at a time with LEONIDA_VK_DEVICE; a main 3faac55 build on the same machine for comparison.

Full ctest:

NVIDIA RTX 4080 (621.01) AMD Radeon iGPU, Ryzen 9 9950X3D (RDNA2, 32.0.21042.62)
this PR, LEONIDA_VK_VALIDATION=1 179/179 pass 178/179, 1 fail
main, LEONIDA_VK_VALIDATION=1 169/169 pass 168/169, 1 fail
this PR, validation unset 179/179 pass not run
  • The one Radeon failure is d3d12_sparse_queue_family_contract (exit=3221225477), the same on main (TEST-1089), not from this PR.
  • The two new tests, run_tiny_frame_validation and vk_validation_probe, pass on both GPUs. vk_sync_validation passes with validation on both and skips with it unset, as on main.
  • No Validation Error in any run.

The probe, with d3d12_com_test by hand on the RTX 4080:

Environment Result
LEONIDA_VK_VALIDATION=1 "validation probe: reported, validation is active", device: ... (validation on), exit 0
LEONIDA_VK_VALIDATION unset no probe, exit 0
LEONIDA_VK_VALIDATION=1, VK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation "is set but validation is not active", exit 1

So on native Windows the layer is still requested by name when the loader lists it, and a run that asks for validation without a layer fails instead of reporting 0 errors.

pytest tests/test_check_tiny_frame.py tests/test_check_validation_probe.py tests/test_ctest_registration.py tests/test_docs_repo_paths.py: 30 passed. git diff --check: clean. MSVC warnings: the 7 that main has in the xgameruntime tests and d3d12_vulkan_device_test.cpp, none in the files this PR changes.

Not tested: Wine. No game files. AI-assisted (Claude Code built and ran the tests).

@Atomic258

Copy link
Copy Markdown
Contributor

Tested a59c29d on Windows Server 2022, CPython 3.13.12: pass

  • python -I tests/test_check_tiny_frame.py -> Ran 18 tests, OK; python -I tests/test_check_validation_probe.py -> Ran 6 tests, OK
  • C++ fixture parts untested.

git diff --check clean; python -m compileall -q exit 0. No game files, no GPU. AI-assisted (Devin).

@speed-y

speed-y commented Nov 23, 2026

Copy link
Copy Markdown

Tested 71d32ef517896f20ec65efddf6a1403cf7f89038 on NVIDIA GeForce RTX 5080, driver 621.24, Windows 11 (native, not Wine), VS 2022 / Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0 validation layer: pass

  • python -I tests/test_check_validation_probe.py: 6/6
  • python -I tests/test_check_tiny_frame.py: 18/18
  • ctest -R 'vk_validation_probe|run_tiny_frame|run_tiny_frame_validation': 3/3 passed (validation probe + tiny_frame + tiny_frame with LEONIDA_VK_VALIDATION=1)

Native Windows lists the Khronos layer, so this does not exercise the Wine enabledLayerCount path; it does confirm the probe / tiny_frame validation wiring on an RTX 5080 host.

No game files. AI-assisted.

@sennecools

sennecools commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Tested 71d32ef51 on Windows 11 Pro 26300, MSVC 2022 / Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, AMD Radeon RX 9070 XT (RDNA4, 32.0.32029.2010) and the Ryzen 9800X3D iGPU Radeon(TM) Graphics (RDNA2 gfx1036, 32.0.21045.29003). Code: pass, first RDNA4 run on this head. Docs: tests/test_docs_cli_flags.py fails.

  • Full ctest with LEONIDA_VK_VALIDATION=1: 235/239 on both GPUs; without validation (9070 XT) 234/239. Every failure is also on main 561b65a83 here (d3d12_texture_tiles, d3d12_sparse_queue_family_contract, d3d12_indirect_dispatch_count, d3d12_pipeline_library_host, plus vk_queue_query_sync without validation).
  • vk_validation_probe, run_tiny_frame, run_tiny_frame_validation, d3d12_com, d3d12_indirect_rt, vk_sync_validation: 6/6 in 3 runs on each GPU. tests/test_check_tiny_frame.py 18/18, tests/test_check_validation_probe.py 6/6.
  • Negative control (the 4 C++ files set back to 561b65a83): vk_validation_probe and run_tiny_frame_validation fail.
  • Layer hidden (VK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation), tiny_frame: main fails D3D12XboxCreateDevice with 0x80004005; this head prints "validation is off" and passes, and --validation skips with 77.
  • No layer at all (VK_LAYER_PATH set to an empty folder): the two new tests skip, and d3d12_com / d3d12_indirect_rt fail with "validation is not active", as the description says.

Two things in docs/testing.md:

  1. python -I tests/test_docs_cli_flags.py fails (3 of 3, CI runs it): flags in the docs that no source file mentions: docs/testing.md:552 --command. It is the winedbg --command "bt all" in the row this PR adds (in a59c29dfc already); the test passes on main.
  2. The merge commit 71d32ef51 brings back, at line 553, the old copy of the "On RADV with Mesa 25.2" row, directly above the current one at 554: grep -c "On RADV with Mesa 25.2" docs/testing.md gives 2 here and 1 on main.

With this the test passes again (checked):

-| A program under `xvfb-run -a wine` never gets past its first Vulkan call (device creation), and `winedbg --command "bt all"` shows it in `wine_vk_init` | ...
+| A program under `xvfb-run -a wine` never gets past its first Vulkan call (device creation), and a `winedbg` backtrace (`bt all`) shows it in `wine_vk_init` | ...

and line 553 deleted.

The PR also no longer merges onto current main (conflicts with #5110 in d3d12_com.h, d3d12_vulkan_device.cpp, check_tiny_frame.py, CMakeLists.txt). Wine was not run here.

Synthetic tests only, no game files. AI-assisted.

…d flag, and drop the duplicate RADV Mesa 25.2 row
# Conflicts:
#	runtime/CMakeLists.txt
#	runtime/shims/d3d12_com.h
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/test/check_tiny_frame.py
@tedin7

tedin7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @sennecools for the review.

Changes (two new commits, no rebase or force push):

  • docs/testing.md: the Known problems row now says "a winedbg backtrace (bt all)" instead of quoting --command, so tests/test_docs_cli_flags.py no longer flags it. The test itself is unchanged.
  • docs/testing.md: removed the duplicate "On RADV with Mesa 25.2" row that the earlier merge brought back, and kept the newer one (with the RADV 25.0.7 / ANV notes). grep -c "On RADV with Mesa 25.2" docs/testing.md gives 1.
  • Merged origin/main (1cc6e3c12), which conflicted with Runtime: D3D12 queues share a VkQueue when the GPU has no free one (Intel UHD 770 queueCount 1), plus a CPU-signal hang fix #5110 (e76cb47f) in d3d12_com.h, d3d12_vulkan_device.cpp, runtime/CMakeLists.txt and runtime/test/check_tiny_frame.py. Both sides are kept:
    • from main: QueueTestSettings on create_vulkan_device_standalone, the shared-VkQueue path and the fence fix, --queue-test-settings and run_tiny_frame_queue_test_settings;
    • from this PR: choose_validation (the layer when the loader lists it, an unlisted active layer detected otherwise, and "validation is off" instead of failing the device), --validation and run_tiny_frame_validation, and vk_validation_probe.
    • main's own "layer not listed, so return E_FAIL" block is replaced by choose_validation, because under Wine the layer is never listed and that block would fail every device with LEONIDA_VK_VALIDATION=1.

Tested with the Windows runtime cross-built by clang-cl 19 and xwin, run under Wine 9.0 with the host's VK_LAYER_KHRONOS_validation (SDK 1.4.363.1), VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation LEONIDA_VK_VALIDATION=1. Same results on an RTX 4070 Ti and an RTX 3090:

Test Result
vk_validation_probe passed
run_tiny_frame passed
run_tiny_frame_validation passed (layer active, synchronization validation on, 0 errors)
run_tiny_frame_queue_test_settings passed
d3d12_com passed
vk_sync_validation passed
d3d12_queue_share, d3d12_queue_share_one_queue, d3d12_queue_wait_one_queue, the four d3d12_queue_share_rejects_* 7 of 7 passed
vk_queue failed: 10 validation errors
d3d12_queue_handover_shared_queue failed: Validation Error lines
d3d12_indirect_rt failed: RayQueryKHR ARRAY expected hit=1 miss=0, got hit=0 miss=0

13 of 16 passed. Python: tests/test_docs_cli_flags.py, tests/test_check_tiny_frame.py and tests/test_check_validation_probe.py give 27 passed.

None of the three failures comes from this PR. On plain origin/main (RTX 3090, same Wine setup):

  • With LEONIDA_VK_VALIDATION=1, main never gets validation running under Wine. vk_queue skips ("no usable Vulkan device"), and d3d12_queue_handover_shared_queue and d3d12_indirect_rt fail with "LEONIDA_VK_VALIDATION is set but VK_LAYER_KHRONOS_validation is not installed".
  • Without validation, vk_queue and d3d12_queue_handover_shared_queue pass on both main and this branch, and d3d12_indirect_rt fails on both with the same RayQuery ARRAY message.

So with this PR the layer really runs under Wine, and it shows two problems that main's own tests could not show:

  • vk_queue: WRITE_AFTER_WRITE hazards, where one vkCmdCopyBuffer writes a buffer that an earlier copy on the same VkQueue already wrote, with no barrier between them.
  • d3d12_queue_handover_shared_queue: VUID-vkCmdDraw-None-09600 (the image layout at the draw does not match the layout it is in).

They belong to the tests from #5110, so I'd rather fix them in a follow-up than grow this PR. Tell me if you want them here.

AI-assisted.

@kapitche

Copy link
Copy Markdown
Collaborator

Tested 3506e35 merged with main 8575d36 on native Windows 11, MSVC 14.51, Ninja RelWithDebInfo, plus Linux (WSL2) Python 3.12.16 (-I): pass
Clean merge. Linux: tests/test_check_tiny_frame.py 18 OK, tests/test_check_validation_probe.py 6 OK. Windows ctest -R 'validation_probe|tiny_frame|indirect_rt' after building the PR's targets: run_tiny_frame and run_tiny_frame_queue_test_settings passed; vk_validation_probe and run_tiny_frame_validation skipped (exit 77, this host has no validation layer, so the layer-active path itself was not run here); d3d12_indirect_rt failed with 'RayQueryKHR ARRAY expected hit=1 miss=0, got hit=0 miss=0'.
That d3d12_indirect_rt failure is not from this PR: a build with runtime/ reverted to current main fails the same way on this machine (it runs without LEONIDA_VK_VALIDATION, which is the only path the PR touches).
Negative control: with d3d12_com.h, d3d12_vulkan_device.cpp and vk_test_device.h reverted to main (test and CMake files kept), vk_validation_probe and run_tiny_frame_validation fail instead of skipping, so the new tests do change outcome with the source.

@tunczzz

tunczzz commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 3506e35c (merge base 1cc6e3c1) on Windows 11 10.0.26300 with an NVIDIA GeForce RTX 5070 Ti (Blackwell, subgroup 32..32), driver 616.56. Result: pass (no failure that main doesn't have).

  • Runtime built from this head: MSVC 19.44 (BuildTools 2022), Ninja, RelWithDebInfo, -DLEONIDA_VULKAN_HEADERS_FETCH=ON. Vulkan SDK 1.4.363.0 is installed, so the *_validated ctests ran with its validation layer. glslangValidator and llvm-mc 21 came from WSL Ubuntu. Build exit 0.
  • ctest -j 3: 250 passed, 11 skipped, 1 failed (d3d12_indirect_dispatch_count).
  • scripts/run_gpu_tests.py --build <this build>: 186/235 passed, 48 skipped, 1 failed.
  • New ctests here: d3d12_queue_share PASSED, d3d12_queue_share_one_queue PASSED, d3d12_queue_share_rejects_case_typo PASSED, d3d12_queue_share_rejects_iterations_too_many PASSED, d3d12_queue_share_rejects_iterations_word PASSED, d3d12_queue_share_rejects_iterations_zero PASSED, d3d12_queue_wait_one_queue PASSED, gta6rt_stack PASSED, module_names PASSED, run_module_names PASSED, run_tiny_frame_queue_test_settings PASSED, run_tiny_frame_validation PASSED, run_tiny_game_stack PASSED, vk_pipeline_check_stack PASSED, vk_validation_probe PASSED.
  • New GPU tests here: cs_w32_fcmpswap PASS, ps_exp_color_mask PASS, ps_sample_implicit_uint PASS.
  • The merge base 1cc6e3c1 is not main 561b65a8. Every test that exists in both gives the same result as on main.
  • d3d12_indirect_dispatch_count and ms_wave_info_s3, which fail on main 561b65a8: d3d12_indirect_dispatch_count fails as on main (the fixture still reads s0:s1; d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout) #5792 fixes it); ms_wave_info_s3 fails as on main (rdna2spirv: %ms_counts is stored atomically by whichever wave sends; ms_wave_info_s3 draws nothing on main on most GPUs (SHADER-766) #5741 / rdna2spirv: use OpAtomicStore for MSG_GS_ALLOC_REQ %ms_counts #5855 fix it) on this base.

Not run: other GPUs/vendors, Linux, anything that needs game files. No game files.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants