Skip to content

Commit f397b61

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ 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 | native::WGPUVertexStepMode_Undefined => wgt::VertexStepMode::Vertex,
21602160
native::WGPUVertexStepMode_Instance => wgt::VertexStepMode::Instance,
21612161
_ => panic!("invalid vertex step mode for vertex buffer layout"),
21622162
},

0 commit comments

Comments
 (0)