Skip to content

Commit 163a1da

Browse files
Handle WGPUVertexStepMode_Undefined
stepMode defaults to "vertex". https://www.w3.org/TR/webgpu/#dom-gpuvertexbufferlayout-stepmode
1 parent d231ff7 commit 163a1da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,8 @@ pub unsafe extern "C" fn wgpuDeviceCreateRenderPipeline(
21562156
.map(|buffer| wgc::pipeline::VertexBufferLayout {
21572157
array_stride: buffer.arrayStride,
21582158
step_mode: match buffer.stepMode {
2159-
native::WGPUVertexStepMode_Vertex => wgt::VertexStepMode::Vertex,
2159+
native::WGPUVertexStepMode_Vertex
2160+
| native::WGPUVertexStepMode_Undefined => wgt::VertexStepMode::Vertex,
21602161
native::WGPUVertexStepMode_Instance => wgt::VertexStepMode::Instance,
21612162
_ => panic!("invalid vertex step mode for vertex buffer layout"),
21622163
},

0 commit comments

Comments
 (0)