Repository navigation
Tests: per-process temp folders for shader libraries; d3d12_compute skips the CachedPSO host comparison under Wine - #3023
Conversation
|
Tested da6861b on Windows 11, RTX 5080 (driver 616.92) and AMD Radeon iGPU gfx1036 (driver 26.10.1): the ten tests whose sources this PR changes, via
AI-assisted. |
|
Tested da6861b on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Independent Windows 11 26300 / MSVC 19.52 / RTX 5070 Ti, NVIDIA 621.24 check of With five rounds of four One rare cleanup edge case: in No game files were used. — LocalFirst-AI |
|
Tested da6861b on NVIDIA RTX 5060 Ti (Blackwell), NVIDIA 621.01 (Vulkan 1.4.357), Windows 11, VS Build Tools 2022 (MSVC) + Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0: pass.
AI-assisted (Qoder): I built the full runtime with MSVC and ran parallel ctest. |
|
Tested
Not checked: Wine, so the new CachedPSO skip and the |
|
Tested da6861b (merged onto main 1628210) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass
AI-assisted (Claude). |
|
A data point from native Windows, not a test of this PR: the same "every host answered nothing" condition this PR skips under Wine also happens on a native Windows 10 host here, so Setup: Windows 10 22H2 (build 19045.5737), NVIDIA GeForce RTX 3090, driver 621.24, MSVC 19.44. Measured with temporary prints in
So Suggestion: in AI-assisted (Claude). |
|
Tested da6861b on Sapphire RX 9070 XT Nitro+ (AMD 26.11.2 LLPC, driverVersion 2.0.416), Windows 11 26200, MSVC: pass. The runtime builds. Full |
d3d12_compute and the other tests that write a translator-style shader library under the temp directory (d3d12_draw, d3d12_set0_compute, d3d12_msaa_draw, d3d12_fspx_compute, d3d12_pipeline_library, d3d12_subgroup, d3d12_bundle, d3d12_typeless_families, shader_library) used one fixed folder name. Two copies running at once (ctest -j, or two suites in one Wine prefix or TMPDIR) shared it, and one copy's remove_all deleted the modules the other was loading: on an Apple M3 Max under Wine with MoltenVK 1.4.3, four copies of d3d12_compute at once failed 6 of 40 runs (PSO creation at lines 245/357, or exit 3 from an uncaught filesystem_error in copy_file), while 125 runs one at a time all passed. test_temp_dir.h names the folder <temp>/<name>_<pid>, removes it on scope exit (early returns included), and copies the compiled-in LEONIDA_TEST_*_SPV files with an error code, so a missing file is reported by name instead of ending the test with abort(). docs/testing.md lists both symptoms.
ItsNotRexed#1683's comparison expected Wine to have no host D3D12 device or no compiler. Wine has both (vkd3d and its d3dcompiler_47), but vkd3d's GetCachedBlob is a stub, so cached_pso_cases returned no answers for each host adapter and `host == layer` failed on every run (line 388; Apple M3 Max, CrossOver 26.3 / Wine 11 with MoltenVK 1.4.3). Like the other host comparisons (host_wine.h), it now skips under Wine and says why; the layer's own 11 answers are still checked against the expected list.
da6861b to
421bf0b
Compare
|
Tested on AMD Radeon RX 6600 (RDNA2, gfx1032), Windows 11, Adrenalin 26.11.2 (Vulkan driver 32.0.21045.29003). PR head
No regressions on this hardware. |
|
Tested 421bf0b on Tiger Lake (Xe-LP) iGPU 0x9a78, driver 32.0.101.7088, Windows 11, MSVC 14.44: pass Full The PR's own area on native Windows (where the Wine skip correctly does not trigger): AI-assisted (GLM, operated by the account owner). |
Claimed in the coordination issue as: #2516 (comment) (
d3d12_computeflaky on a Mac under Wine)What and why
d3d12_computepassed in some full Wine runs on a Mac and failed in others. Two separate causes, neither of them GPU synchronization:1. Copies running at once shared one temp folder (the flaky part). The test writes its translator-style shader library (an
index.jsonand the.spv) into%TEMP%\leonida_compute_testand deletes that folder at the end. Two copies running at the same time (ctest -j, or two suites in one Wine prefix or oneTMPDIR, which happens when several agents test on one Mac) use the same folder, and one copy'sremove_alldeletes the modules the other is still loading. On49475796, Apple M3 Max, CrossOver 26.3 (Wine 11) with MoltenVK 1.4.3:d3d12_compute.exeunder WineThe 6 failures were PSO creation (
line 245slot 67,line 357CreateComputePipelineState), or exit 3 with no message: an uncaughtstd::filesystem::filesystem_errorfromcopy_fileonce the other copy had deleted the folder. Nine other tests (d3d12_draw,d3d12_set0_compute,d3d12_msaa_draw,d3d12_fspx_compute,d3d12_pipeline_library,d3d12_subgroup,d3d12_bundle,d3d12_typeless_families,shader_library) used the same fixed-name pattern.runtime/test/test_temp_dir.haddstestfiles::ScratchDir:<temp>/<name>_<pid>, emptied when created and removed when it goes out of scope, early returns included.testfiles::copy_filecopies the compiled-inLEONIDA_TEST_*_SPVfiles with an error code, so a missing file is now named (cannot copy …: File not found, then theline N:of the check) instead of ending the test inabort(). That silent exit 3 also accounts for an earlier "flaky" full run: a CI artifact was run under Wine by hand without theD:drive its compiled-inD:/a/Leonida/Leonida/…paths need. I confirmed this with the same artifact: exit 3 withoutD:, and it passes withD:mapped the wayrun_wine_tests.pymaps it.docs/testing.mdlists both symptoms.2. The CachedPSO host comparison failed on every run under Wine (since #1683). After rebasing onto round 40, the test failed every run at
line 388: host == layer, onmainas well as on this branch. The comparison assumed Wine has no host D3D12 device or no compiler. Wine has both (vkd3d and itsd3dcompiler_47), but vkd3d'sGetCachedBlobis a stub, socached_pso_casesreturned no answers for either host adapter and the empty list never equals the layer's 11. It now skips under Wine throughhostwine::host_is_wine(), like the other host comparisons, and prints why. The layer's own 11 answers are still checked against the expected list, and Windows runs the host comparison as before.Tested
AI-assisted (Claude Code). Apple M3 Max, macOS 27.3. The Windows build is clang-cl 23.1.6 + xwin 10.0.26100, run under CrossOver 26.3 (Wine 11.0) with MoltenVK 1.4.3 (main 5189f8de). The native build uses Homebrew MoltenVK 1.4.2.
ec8ec4c9four at once: 0/40, every run atline 388..spv(renamed away):cannot copy …cs_user_data.spv to C:\users\crossover\AppData\Local\Temp\leonida_compute_test_32\cs_user_data.spv: File not found.thenline 160: …, exit 1. The temp folder is gone afterwards.run_wine_tests.pylist: baseec8ec4c999 pass / 4 fail / 27 skip, branch 100 / 3 / 27. The only change:d3d12_computeFAIL → PASS. The other three failures (d3d12_descriptor,d3d12_uav_clear,d3d12_vulkan_device) fail the same way on both and aren't touched here (d3d12: order timestamp resolves after their writes on MoltenVK #1947 coversd3d12_vulkan_device's timestamp check,line 5467).ctestonruntime/build/mac: 34 pass, 2 skip (shader_library_corpus,vk_sync_validation), 1 fail (xdxr_build_check, BVH refitblas_refit_in_place), identical before and after. The failure exists onmainand isn't touched here.leonida_compute_test,leonida_pipeline_library_test) come from the base runs: the base never removes the second one, and a failing run of the first leaves it behind.Rebased on
f847748c(after #3023 conflicted with0cb7657d, "Find packaged shader fixtures in relocated GPU test artifacts"): the copies now go through both helpers,testfiles::copy_file(vktest::shader_fixture_path(...), ...), and thedocs/testing.mdrow about CI artifacts mentions running from the artifact folder. After the rebase,d3d12_computeunder Wine passed 10/10 one at a time and 40/40 four at once (10 rounds), serialized with the other GPU runs on this Mac.Checklist
docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code