mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
wgpu-hal's D3D12 backend caches each compiled shader and hands every pipeline a clone of the cached ID3DBlob, calling AddRef under the cache lock and Release outside it (gfx-rs/wgpu#10547). Compositor::build creates its pipelines in parallel, all from one vertex entry point and each effect-map kernel twice from one fragment shader, so on D3D12 + FXC the builds raced on shared blobs and dropping the device could abort (0xc0000409 on CI's WARP runs). The build stays parallel, but no shader is shared between threads: the vertex stage moves to a generated module with one entry point per build job; an effect-map kernel builds both formats in one job; and concurrent Compositor::build calls take turns behind a process-wide lock. Fixes #9173. Co-Authored-By: Claude Opus 5.5 <[email protected]>