diff --git a/src/igl/metal/RenderCommandEncoder.mm b/src/igl/metal/RenderCommandEncoder.mm index de82808e7c..4d89a8ba08 100644 --- a/src/igl/metal/RenderCommandEncoder.mm +++ b/src/igl/metal/RenderCommandEncoder.mm @@ -267,6 +267,9 @@ auto& metalBuffer = static_cast(*buffer); [encoder_ setVertexBuffer:metalBuffer.get() offset:offset atIndex:index]; [encoder_ setFragmentBuffer:metalBuffer.get() offset:offset atIndex:index]; + } else { + [encoder_ setVertexBuffer:nil offset:0 atIndex:index]; + [encoder_ setFragmentBuffer:nil offset:0 atIndex:index]; } }