Repository navigation
Description
startup: the async compute translation sets a sampler root signature before binding the sampler heap
Summary
startup_compute_dispatch_sampler_heap_hardware passes at 077bff3ac and fails from 35a3f6d6c onward —
the merge tip of #3451, translating native compute programs on a worker thread. It is still failing at
e61a16531.
077bff3ac (before #3451) startup_compute_dispatch_sampler_heap_hardware Passed 9.57 sec
35a3f6d6c (#3451 merge) startup_compute_dispatch_sampler_heap_hardware Failed 7.42 sec
cf43986db startup_compute_dispatch_sampler_heap_hardware Failed 6.82 sec
e61a16531 startup_compute_dispatch_sampler_heap_hardware Failed 6.82 sec
Failure
AssertionError: x2w-d3d12-debug [translated dispatch 14] sev=1 id=1419
ID3D12CommandList::SetComputeRootSignature: SetDescriptorHeaps must be called to bind a sampler
descriptor before setting a root signature with D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED
The fixture sets X2W_D3D12_DEBUG=1 and X2W_D3D12_LIST_NOOP=1, so the debug layer's messages are part of
what it asserts. Deterministic: it fails the same way in isolation, not only under a sweep.
Why no CI job sees it
- The
warpvariant of the same fixture reports a capability skip (77), so the in-box WARP job cannot
reach it. - The
hardwarevariant needs a physical device; neither Windows job runs_hardware. - It is not in the
prpreset either.
So #3451 merged green with this failing on real hardware.
Likely path
src/startup_stubs/d3d12_compute_dispatch.inl binds heaps before the root signature, but only when it has
to:
// A directly indexed root needs its sampler heap set before the root signature; another program keeps
// whatever sampler heap is bound.
ID3D12DescriptorHeap* const samplers = tr->sampler_heap_bytes ? pass.sampler_heap.Get() : nullptr;
if (!pass.heap_set || (samplers && pass.bound_sampler_heap != samplers)) {
x2w_startup::bind_translated_heaps(list, draw_heap, samplers);
pass.heap_set = true;
pass.bound_sampler_heap = samplers;
}
list->SetPipelineState(tr->pipeline.Get());
list->SetComputeRootSignature(tr->root.Get());Two ways that reaches 1419: tr->sampler_heap_bytes is non-zero while pass.sampler_heap is null, so
samplers is null and the heap set is bound without a sampler heap; or the pass state (heap_set,
bound_sampler_heap) is now shared by a dispatch that ran earlier on the worker-thread route. #3451 changed
when the published program and its pass state become visible, which is consistent with the bisect but I have
not isolated which of the two it is.
Either way the shim sets a root signature that declares a directly indexed sampler heap without that heap
bound. Refusing the dispatch when the program needs a sampler heap and none is bound would be consistent
with the rest of the path; binding one is the alternative.
Reproduction
In-box dev preset on a physical device (RTX 4070 Ti SUPER, driver 32.0.16.2101, Windows 10.0.26200):
ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_sampler_heap_hardware$' -VContext
This is the only functional failure in a 988-test _hardware sweep of cf43986 (979 passed, 4 skipped).
The other four are #3622's fixtures (three) and one load-related timeout that passes in 16 s in isolation.
The sweep is what found this; every other channel is blind to it.
Activity
KelboLive commentedon Nov 30, 2026
Fixed at
bee9c64d9by #3626 (5be36341a, "keep the sampler heap span when installing a compute translation"), which is the area this pointed at.The three fixtures from #3622 also pass on hardware at this head (
startup_gfx2hlsl_cvt_off_f32_i4_hardware1.98 s,startup_image_sample_b_flow_hardware13.57 s,startup_image_get_lod_flow_hardware6.25 s).No debug-layer 1419 message remains. Closing as fixed; the bisect in the report (pass at
077bff3, fail at35a3f6d) is no longer needed for anything, so I am not adding it to #3451 separately.