From 15169cf754af3575c06b78b90ee2444c93060a19 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Tue, 30 Jun 2015 10:18:36 -0600 Subject: demos: Ensure VertexInputState is NULL if unused Was passing in pointer to a null VertexInputState structure, but driver needs null pointer if structure unused. --- demos/cube.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index f5391832..c9b0abaf 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1332,7 +1332,6 @@ static void demo_prepare_pipeline(struct demo *demo) { VkGraphicsPipelineCreateInfo pipeline; - VkPipelineVertexInputStateCreateInfo vi; VkPipelineIaStateCreateInfo ia; VkPipelineRsStateCreateInfo rs; VkPipelineCbStateCreateInfo cb; @@ -1341,8 +1340,6 @@ static void demo_prepare_pipeline(struct demo *demo) VkPipelineMsStateCreateInfo ms; VkResult U_ASSERT_ONLY err; - memset(&vi, 0, sizeof(vi)); - memset(&pipeline, 0, sizeof(pipeline)); pipeline.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; pipeline.layout = demo->pipeline_layout; @@ -1404,7 +1401,7 @@ static void demo_prepare_pipeline(struct demo *demo) shaderStages[1].stage = VK_SHADER_STAGE_FRAGMENT; shaderStages[1].shader = demo_prepare_fs(demo); - pipeline.pVertexInputState = &vi; + pipeline.pVertexInputState = NULL; pipeline.pIaState = &ia; pipeline.pRsState = &rs; pipeline.pCbState = &cb; -- cgit v1.2.3