8 Commits

Author SHA1 Message Date
44ddf9b052 Merge pull request #1600 from thiefyzheng/fix/test-tempdir-stripped-env 2026-11-29 13:44:40 +01:00
b5447692f2 test: catch a lost parent root UAV right after a bundle's ExecuteIndirect (review on #2575)
After the second ExecuteBundle, a UAV barrier and a direct Dispatch run
before any rebind, so slot 1 holds 7/11 only if the parent's root UAV
survived the bundle. Layer, WARP and the default adapter (RTX 4060,
610.88) give 6/10 7/11 1/1 in both same_root cases, as measured by the
reviewer on an RTX 5070.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:42:41 +01:00
b17397f0dd tests: derive every test's scratch folder from test_temp_dir::temp_dir, not GetTempPath (TEST-TEMPDIR-STRIPPED-ENV)
With TMP, TEMP and USERPROFILE all unset, GetTempPathW returns C:\Windows\, and the throwing create_directories/copy_file/ofstream on C:\Windows\leonida_* aborts with 0xc0000409 before the test body runs. runtime/test/test_temp_dir.h grows one entry, testfiles::temp_dir(): LEONIDA_TEST_DIR when set, the current directory when the temp environment is stripped (Windows), else the standard temp resolution. Fifty-two test files and the tiny_game fixture that called GetTempPathA/W or temp_directory_path directly now use it; d3d12_queue_handover_test.cpp also checks the _sopen_s result in capture_stderr instead of silently returning empty stderr. One runtime source function needed the same fallback because tests exercise it: tls_host_clone_dir in runtime/src/pe_loader.cpp (the loader_tls tests). Rebased onto current main after its D3D-448 additions to d3d12_mesh_test.cpp (3-way; the mesh test keeps both). Verification on a Windows VM: stripped environment - the previously crashing d3d12 tests exit 77 (no usable Vulkan device) instead of aborting, file_system_test runs all 505 checks and loader_test all 95 with zero failures; normal environment - identical outcomes; LEONIDA_TEST_DIR honored under a fully stripped environment (the scratch folder observed mid-run inside it, cleaned up after the pass). The finding is whoalin1's (coordination issue #14, 02:37:44Z).

AI-assisted.
2026-11-28 19:01:06 +00:00
13d95b7618 d3d12: test bundle ExecuteIndirect(DISPATCH) and fix the stale bundle note (D3D-BUNDLE-EXECUTE-INDIRECT)
ExecuteIndirect in a bundle is already deferred on main (single DRAW,
DRAW_INDEXED, DISPATCH or DISPATCH_MESH, no count buffer); only DRAW and
DRAW_INDEXED had a GPU test and docs/d3d12_vulkan.md still listed it as
"Not deferred yet".

d3d12_indirect_dispatch_count_test --bundle (ctest
d3d12_bundle_indirect_dispatch) runs a fixed-count DISPATCH recorded in a
bundle twice from a direct list with a different parent root UAV each
time, then a direct Dispatch, on the layer, WARP and the default adapter,
and checks that a count buffer or a root-constant signature fails the
bundle's Close (E_INVALIDARG on both host adapters, as on the layer).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 15:47:59 +01:00
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
ffce6b5c39 Tests: eight host-comparison tests skip Wine's host and still check the layer (TEST-WINE-HOST-GUARDS)
d3d12_noop_copy, d3d12_indirect_dispatch_count, d3d12_typeless_depth, d3d12_residency, d3d12_heap_properties,
dxgi_swapchain, dxgi_host_parity and dxgi_waitable_latency compared the layer with the host's D3D12/DXGI without
the host_wine.h guard the other host-comparison tests use. Under Wine that host is vkd3d and Wine's own DXGI, so
all eight failed on its answers, two of them in a page fault inside wined3d/dxgi, and three before the layer's own
checks ran.

Under Wine the host comparison is now skipped: the tests whose every case is a host comparison exit 77, and the
others go on to check the layer. d3d12_indirect_dispatch_count also names a D3DCompile failure of its reference
shader instead of exiting 1 without a word. On Windows the tests run as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 04:11:27 -06:00
067c579913 d3d12_indirect_dispatch_count_test: check the layer against the expected count
In-box WARP 10.0.22621.5415 (Windows 11 23H2) reuses the first count for the
second counted ExecuteIndirect after a GPU copy overwrites the count buffer
(0 -> 3 gives 0/0, 1 -> 3 gives 2/2), so the test failed on every 23H2 host
although the layer gives the expected result in all eight cases.

The layer is now compared with expected(). WARP must still match it, except
when it gives exactly the stale-count result in a GPU-update case; that case
is printed with the WARP build instead of failing the test.
2026-11-23 04:45:57 +01:00
c262fb7b3c Runtime: gate counted indirect compute dispatches on GPU 2026-11-22 15:34:34 -05:00