-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area: correctnessWe're behaving incorrectlyWe're behaving incorrectlybackend: dx12Issues with DX12 or DXGIIssues with DX12 or DXGItype: bugSomething isn't workingSomething isn't working
Description
In (at least) [edit] multi_draw_indirect the stride is calculated wrong for Dx12 backend.
wgpu/wgpu-core/src/command/render.rs
Lines 2758 to 2761 in 49b773f
| debug_assert_eq!( | |
| draw_data.offset, | |
| current_draw_data.offset + stride * current_draw_data.count as u64 | |
| ); |
The draw_data.offset is calculated to be 28 in DrawBatcher::add, due to "space for D3D12 special constants". I am not familiar with DX12 backend enough to know what these are, but it seems right. However, the right hand of this assert is calculated by
wgpu/wgpu-core/src/command/render.rs
Lines 3605 to 3610 in 49b773f
| pub(crate) const fn get_stride_of_indirect_args(indexed: bool) -> u64 { | |
| match indexed { | |
| false => size_of::<wgt::DrawIndirectArgs>() as u64, | |
| true => size_of::<wgt::DrawIndexedIndirectArgs>() as u64, | |
| } | |
| } |
which does not account for those extra constants and returns 16 bytes.
wgpu 26.0.1
hasenbanck
Metadata
Metadata
Assignees
Labels
area: correctnessWe're behaving incorrectlyWe're behaving incorrectlybackend: dx12Issues with DX12 or DXGIIssues with DX12 or DXGItype: bugSomething isn't workingSomething isn't working
Type
Projects
Status
Todo