diff options
| -rw-r--r-- | demos/cube.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/demos/cube.c b/demos/cube.c index d2c20d06..ea53f496 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1539,6 +1539,7 @@ static void demo_prepare_pipeline(struct demo *demo) { VkGraphicsPipelineCreateInfo pipeline; VkPipelineCacheCreateInfo pipelineCache; + VkPipelineVertexInputStateCreateInfo vi; VkPipelineInputAssemblyStateCreateInfo ia; VkPipelineRasterStateCreateInfo rs; VkPipelineColorBlendStateCreateInfo cb; @@ -1558,6 +1559,9 @@ static void demo_prepare_pipeline(struct demo *demo) pipeline.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; pipeline.layout = demo->pipeline_layout; + memset(&vi, 0, sizeof(vi)); + vi.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + memset(&ia, 0, sizeof(ia)); ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; @@ -1623,7 +1627,7 @@ static void demo_prepare_pipeline(struct demo *demo) err = vkCreatePipelineCache(demo->device, &pipelineCache, &demo->pipelineCache); assert(!err); - pipeline.pVertexInputState = NULL; + pipeline.pVertexInputState = &vi; pipeline.pInputAssemblyState = &ia; pipeline.pRasterState = &rs; pipeline.pColorBlendState = &cb; |
