Set vertex input state flags to zero

This commit is contained in:
saschawillems 2016-04-30 11:51:35 +02:00
parent 8ee2687ced
commit a774cda58d

View file

@ -41,7 +41,7 @@ public:
struct { struct {
VkBuffer buf; VkBuffer buf;
VkDeviceMemory mem; VkDeviceMemory mem;
VkPipelineVertexInputStateCreateInfo vi; VkPipelineVertexInputStateCreateInfo inputState;
std::vector<VkVertexInputBindingDescription> bindingDescriptions; std::vector<VkVertexInputBindingDescription> bindingDescriptions;
std::vector<VkVertexInputAttributeDescription> attributeDescriptions; std::vector<VkVertexInputAttributeDescription> attributeDescriptions;
} vertices; } vertices;
@ -542,12 +542,13 @@ public:
vertices.attributeDescriptions[1].binding = 0; vertices.attributeDescriptions[1].binding = 0;
// Assign to vertex buffer // Assign to vertex buffer
vertices.vi.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; vertices.inputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
vertices.vi.pNext = NULL; vertices.inputState.pNext = NULL;
vertices.vi.vertexBindingDescriptionCount = vertices.bindingDescriptions.size(); vertices.inputState.flags = VK_FLAGS_NONE;
vertices.vi.pVertexBindingDescriptions = vertices.bindingDescriptions.data(); vertices.inputState.vertexBindingDescriptionCount = vertices.bindingDescriptions.size();
vertices.vi.vertexAttributeDescriptionCount = vertices.attributeDescriptions.size(); vertices.inputState.pVertexBindingDescriptions = vertices.bindingDescriptions.data();
vertices.vi.pVertexAttributeDescriptions = vertices.attributeDescriptions.data(); vertices.inputState.vertexAttributeDescriptionCount = vertices.attributeDescriptions.size();
vertices.inputState.pVertexAttributeDescriptions = vertices.attributeDescriptions.data();
} }
void setupDescriptorPool() void setupDescriptorPool()
@ -757,7 +758,7 @@ public:
// Assign pipeline state create information // Assign pipeline state create information
pipelineCreateInfo.stageCount = shaderStages.size(); pipelineCreateInfo.stageCount = shaderStages.size();
pipelineCreateInfo.pStages = shaderStages.data(); pipelineCreateInfo.pStages = shaderStages.data();
pipelineCreateInfo.pVertexInputState = &vertices.vi; pipelineCreateInfo.pVertexInputState = &vertices.inputState;
pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState; pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState;
pipelineCreateInfo.pRasterizationState = &rasterizationState; pipelineCreateInfo.pRasterizationState = &rasterizationState;
pipelineCreateInfo.pColorBlendState = &colorBlendState; pipelineCreateInfo.pColorBlendState = &colorBlendState;