Actually check the vertex binding I meant to check.

This commit is contained in:
Chip Davis 2018-12-17 11:05:37 -06:00
parent 288211d81f
commit 6ff8a46a3c

View File

@ -377,7 +377,7 @@ MTLRenderPipelineDescriptor* MVKGraphicsPipeline::getMTLRenderPipelineDescriptor
if (shaderContext.isVertexAttributeLocationUsed(pVKVA->location)) {
// Vulkan allows offsets to exceed the buffer stride, but Metal doesn't.
const VkVertexInputBindingDescription* pVKVB = pCreateInfo->pVertexInputState->pVertexBindingDescriptions;
for (uint32_t j = 0; j < vbCnt; j++) {
for (uint32_t j = 0; j < vbCnt; j++, pVKVB++) {
if (pVKVB->binding == pVKVA->binding) { break; }
}
if (pVKVA->offset >= pVKVB->stride) {