From f1174a6fafffd25283046b91773082698edf6448 Mon Sep 17 00:00:00 2001 From: vinsentli Date: Thu, 5 Dec 2024 10:49:07 +0800 Subject: [PATCH] igl | metal | Enable null buffer in RenderCommandEncoder::bindBuffer() --- src/igl/metal/RenderCommandEncoder.mm | 3 +++ 1 file changed, 3 insertions(+) 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]; } }