Context
The one real adaptation the D3D12 spike found: the M2a non-blocking trick hands rive wgpu's OWN open command buffer. On Vulkan that works because wgpu-hal vulkan CommandEncoder exposes pub unsafe fn raw_handle(). The wgpu-hal dx12 CommandEncoder holds the open list in a PRIVATE list: Option<ID3D12GraphicsCommandList> (dx12/mod.rs:861) with no accessor — so as_hal_mut::<dx12::Api>() cannot read it.
Scope
- Default path (ship this): fallback (b) — rive records into its OWN
ID3D12GraphicsCommandList; the bridge does one extra same-queue ExecuteCommandLists via Queue::as_raw() (dx12/mod.rs:739). A single D3D12 queue executes in submission order, so it stays correct and non-blocking (recycle via the watermark). The shim's create signature already takes a CommandQueue (not a per-frame buffer), encoding this model.
- Optional follow-up: add
pub unsafe fn raw_list(&self) -> &ID3D12GraphicsCommandList to wgpu-hal's dx12 CommandEncoder (mirror vulkan's raw_handle()), vendor-patch + upstream PR, enabling the 1:1 record-into-wgpu's-list version (saves one submit/frame).
Acceptance criteria
- D3D12 zero-copy frames are non-blocking with NO wgpu-hal patch (fallback path), correctness verified.
- If the raw_list() patch is pursued: gated behind a cfg/feature so the default build needs no patch; PR link recorded.
Refs
Context
The one real adaptation the D3D12 spike found: the M2a non-blocking trick hands rive wgpu's OWN open command buffer. On Vulkan that works because wgpu-hal vulkan
CommandEncoderexposespub unsafe fn raw_handle(). The wgpu-hal dx12CommandEncoderholds the open list in a PRIVATElist: Option<ID3D12GraphicsCommandList>(dx12/mod.rs:861) with no accessor — soas_hal_mut::<dx12::Api>()cannot read it.Scope
ID3D12GraphicsCommandList; the bridge does one extra same-queueExecuteCommandListsviaQueue::as_raw()(dx12/mod.rs:739). A single D3D12 queue executes in submission order, so it stays correct and non-blocking (recycle via the watermark). The shim's create signature already takes aCommandQueue(not a per-frame buffer), encoding this model.pub unsafe fn raw_list(&self) -> &ID3D12GraphicsCommandListto wgpu-hal's dx12CommandEncoder(mirror vulkan'sraw_handle()), vendor-patch + upstream PR, enabling the 1:1 record-into-wgpu's-list version (saves one submit/frame).Acceptance criteria
Refs
the D3D12 feasibility spike (summarized in ROADMAP.md)(primitive M3a: resolve the D3D12 open-command-list ADAPT (fallback first, optional wgpu-hal raw_list() PR) #2)wgpu-hal-27.0.4/src/dx12/mod.rs:739,861wgpu-hal-27.0.4/src/vulkan/mod.rsraw_handle() (the mirror)crates/bevy-rive/src/zero_copy.rs(the Vulkan record path being ported)