From 02de3f2e2a1ac8914b5b314c2b503e98ed081114 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Mon, 29 Mar 2021 14:20:40 -0700 Subject: [PATCH] Fix, regression with Metal buffers (#3715) --- filament/backend/src/metal/MetalHandles.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filament/backend/src/metal/MetalHandles.mm b/filament/backend/src/metal/MetalHandles.mm index 6b471a24a4..5a2c67961f 100644 --- a/filament/backend/src/metal/MetalHandles.mm +++ b/filament/backend/src/metal/MetalHandles.mm @@ -320,7 +320,7 @@ void MetalRenderPrimitive::setBuffers(MetalVertexBuffer* vertexBuffer, MetalInde uint32_t bufferIndex = 0; for (uint32_t attributeIndex = 0; attributeIndex < attributeCount; attributeIndex++) { const auto& attribute = vertexBuffer->attributes[attributeIndex]; - if (attribute.buffer != Attribute::BUFFER_UNUSED) { + if (attribute.buffer == Attribute::BUFFER_UNUSED) { const uint8_t flags = attribute.flags; const MTLVertexFormat format = (flags & Attribute::FLAG_INTEGER_TARGET) ? MTLVertexFormatUInt4 : MTLVertexFormatFloat4;