aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2015-06-30 10:18:36 -0600
committerMark Lobodzinski <mark@lunarg.com>2015-06-30 10:18:36 -0600
commit15169cf754af3575c06b78b90ee2444c93060a19 (patch)
treec464af66d7d234baceeb44d7a6d73483577bd78c
parent1329906db808a69282e23a6028eb5b6e904f267b (diff)
downloadusermoji-15169cf754af3575c06b78b90ee2444c93060a19.tar.xz
demos: Ensure VertexInputState is NULL if unused
Was passing in pointer to a null VertexInputState structure, but driver needs null pointer if structure unused.
-rw-r--r--demos/cube.c5
1 files changed, 1 insertions, 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;