Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2156,8 +2156,15 @@ pub unsafe extern "C" fn wgpuDeviceCreateRenderPipeline(
.map(|buffer| wgc::pipeline::VertexBufferLayout {
array_stride: buffer.arrayStride,
step_mode: match buffer.stepMode {
native::WGPUVertexStepMode_Undefined if buffer.attributeCount > 0 => {
wgt::VertexStepMode::Vertex
}
native::WGPUVertexStepMode_Vertex => wgt::VertexStepMode::Vertex,
native::WGPUVertexStepMode_Instance => wgt::VertexStepMode::Instance,
native::WGPUVertexStepMode_VertexBufferNotUsed
| native::WGPUVertexStepMode_Undefined => {
panic!("Unused vertex buffers are currently not supported in vertex buffer layout. Instead, use a vertex buffer with no attributes and a defined vertex step mode.")
}
_ => panic!("invalid vertex step mode for vertex buffer layout"),
},
attributes: Cow::Owned(
Expand Down
Loading