d3d12_pipeline_library_host_test runs 46 CreatePipelineLibrary /
ID3D12PipelineLibrary1 calls that need no pipeline state object on the
Vulkan-backed device and on the host runtime, and compares each HRESULT and
what happened to the output pointer (74 values). On the host every call runs
in a child process with a fresh device: a call that faults there leaves the
runtime broken, and in-process the next call failed fast (0xC0000409). On main 25 values differed (RTX
3060, driver 610.88); now none do:
- A foreign, truncated or corrupt blob, the other device's serialized
library, or a null pointer with a size is E_INVALIDARG, and the output
pointer is left as it was (the layer answered DRIVER_VERSION_MISMATCH and
nulled it). One of the layer's own blobs from another format version stays
D3D12_ERROR_DRIVER_VERSION_MISMATCH.
- A pipeline library is a device child, not a pageable object:
QueryInterface(ID3D12Pageable) is E_NOINTERFACE.
- Load*Pipeline with a null output is E_INVALIDARG, not E_POINTER.
Not compared, and printed as such: the serialized size and bytes (each
device's own), and the calls the host faults on (Serialize(nullptr, n),
StorePipeline with a null PSO, Load* with a null name or description), which
the layer answers E_INVALIDARG.
d3d12_pipeline_library_test expected DRIVER_VERSION_MISMATCH for a foreign or
tiny blob; it now expects E_INVALIDARG, and DRIVER_VERSION_MISMATCH for one of
ours from another version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
d3d12_fspx_compute, d3d12_msaa_draw, d3d12_set0_compute and
d3d12_pipeline_library build PSOs from 144-byte shaders. On a device
whose maxPushConstantsSize is 128 (AMD's Windows driver on RDNA2 iGPUs,
some Intel Arc drivers) the layer refuses those PSOs with E_NOTIMPL, as
D3D-14 intends, so the tests failed at the first CreatePipelineState and
ctest reported 4 failures on a correct runtime. They now exit 77 there
(SKIP_RETURN_CODE in CMake) with the reason; pipeline_library still runs
its library-blob checks first. Devices with 144 bytes or more are
unchanged. d3d12_compute and d3d12_draw are left to #2402, which runs
their --pc-tail-ubo path on such devices.
AI-assisted.