Merge pull request #291 from cdavis5e/fix-vertex-divisor

MVKPipeline: Fix getting the vertex attribute divisor struct.
This commit is contained in:
Bill Hollings 2018-10-03 10:41:45 -04:00 committed by GitHub
commit f8c85b1850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ void MVKGraphicsPipeline::initMTLRenderPipelineState(const VkGraphicsPipelineCre
MTLRenderPipelineDescriptor* MVKGraphicsPipeline::getMTLRenderPipelineDescriptor(const VkGraphicsPipelineCreateInfo* pCreateInfo) {
// Collect extension structures
VkPipelineVertexInputDivisorStateCreateInfoEXT* pVertexInputDivisorState = nullptr;
VkStructureType* next = (VkStructureType*)pCreateInfo->pNext;
VkStructureType* next = (VkStructureType*)pCreateInfo->pVertexInputState->pNext;
while (next) {
switch (*next) {
case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
@ -288,7 +288,7 @@ MTLRenderPipelineDescriptor* MVKGraphicsPipeline::getMTLRenderPipelineDescriptor
next = (VkStructureType*)pVertexInputDivisorState->pNext;
break;
default:
next = (VkStructureType*)((VkGraphicsPipelineCreateInfo*)next)->pNext;
next = (VkStructureType*)((VkPipelineVertexInputStateCreateInfo*)next)->pNext;
break;
}
}