Fix, regression with Metal buffers (#3715)

This commit is contained in:
Ben Doherty
2021-03-29 14:20:40 -07:00
committed by Benjamin Doherty
parent 0e7bb53c07
commit 02de3f2e2a

View File

@@ -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;