diff options
| author | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-10-15 17:15:25 -0700 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-10-28 15:36:59 -0600 |
| commit | 515b7aed05ca136bdc86be7e4f3c6aab7e60dff8 (patch) | |
| tree | 224d580eb0d10d0a3408946a4b004074f2f75859 | |
| parent | f7ac9418d6d0df2b4d82bac4a0d9a248d37c4830 (diff) | |
| download | usermoji-515b7aed05ca136bdc86be7e4f3c6aab7e60dff8.tar.xz | |
demos/cube: Provide a non-null VertexInputStateCreateInfo
In the spec for VkGraphicsPipelineCreateInfo, some structs are explicitly
listed as being able to be NULL if they are not used.
VertexInputStateCreateInfo is not one of them.
| -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; |
