diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libANGLE/renderer/metal/VertexArrayMtl.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libANGLE/renderer/metal/VertexArrayMtl.mm b/src/libANGLE/renderer/metal/VertexArrayMtl.mm index b0726b984f..d3e33bf040 100644 --- a/src/libANGLE/renderer/metal/VertexArrayMtl.mm +++ b/src/libANGLE/renderer/metal/VertexArrayMtl.mm @@ -405,7 +405,9 @@ angle::Result VertexArrayMtl::setupDraw(const gl::Context *glContext, const gl::VertexBinding &binding = bindings[attrib.bindingIndex]; bool attribEnabled = attrib.enabled; - if (attribEnabled && !mCurrentArrayBuffers[v] && !mCurrentArrayInlineDataPointers[v]) + if (attribEnabled && + !(mCurrentArrayBuffers[v] && mCurrentArrayBuffers[v]->getCurrentBuffer()) && + !mCurrentArrayInlineDataPointers[v]) { // Disable it to avoid crash. attribEnabled = false; @@ -476,7 +478,7 @@ angle::Result VertexArrayMtl::setupDraw(const gl::Context *glContext, cmdEncoder->setVertexBuffer(mCurrentArrayBuffers[v]->getCurrentBuffer(), bufferOffset, bufferIdx); } - else + else if (mCurrentArrayInlineDataPointers[v]) { // No buffer specified, use the client memory directly as inline constant data ASSERT(mCurrentArrayInlineDataSizes[v] <= mInlineDataMaxSize); |