From a774cda58d1d3864d5a8f3f8f99fc3cd0b316b67 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sat, 30 Apr 2016 11:51:35 +0200 Subject: [PATCH] Set vertex input state flags to zero --- triangle/triangle.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/triangle/triangle.cpp b/triangle/triangle.cpp index 1f70a5a0..1c6ffd42 100644 --- a/triangle/triangle.cpp +++ b/triangle/triangle.cpp @@ -41,7 +41,7 @@ public: struct { VkBuffer buf; VkDeviceMemory mem; - VkPipelineVertexInputStateCreateInfo vi; + VkPipelineVertexInputStateCreateInfo inputState; std::vector bindingDescriptions; std::vector attributeDescriptions; } vertices; @@ -542,12 +542,13 @@ public: vertices.attributeDescriptions[1].binding = 0; // Assign to vertex buffer - vertices.vi.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vertices.vi.pNext = NULL; - vertices.vi.vertexBindingDescriptionCount = vertices.bindingDescriptions.size(); - vertices.vi.pVertexBindingDescriptions = vertices.bindingDescriptions.data(); - vertices.vi.vertexAttributeDescriptionCount = vertices.attributeDescriptions.size(); - vertices.vi.pVertexAttributeDescriptions = vertices.attributeDescriptions.data(); + vertices.inputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + vertices.inputState.pNext = NULL; + vertices.inputState.flags = VK_FLAGS_NONE; + vertices.inputState.vertexBindingDescriptionCount = vertices.bindingDescriptions.size(); + vertices.inputState.pVertexBindingDescriptions = vertices.bindingDescriptions.data(); + vertices.inputState.vertexAttributeDescriptionCount = vertices.attributeDescriptions.size(); + vertices.inputState.pVertexAttributeDescriptions = vertices.attributeDescriptions.data(); } void setupDescriptorPool() @@ -757,7 +758,7 @@ public: // Assign pipeline state create information pipelineCreateInfo.stageCount = shaderStages.size(); pipelineCreateInfo.pStages = shaderStages.data(); - pipelineCreateInfo.pVertexInputState = &vertices.vi; + pipelineCreateInfo.pVertexInputState = &vertices.inputState; pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState; pipelineCreateInfo.pRasterizationState = &rasterizationState; pipelineCreateInfo.pColorBlendState = &colorBlendState;