summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-03-01 14:01:24 +0000
committerTomasz Kramkowski <tk@the-tk.com>2018-03-01 14:43:20 +0000
commit31497799058ddd776c1d448ea8931f598e86ae79 (patch)
treecc04b4d0139698282d701a31d805959b59bf5c69
parent12df3d028326a158a0b2f6cf2b34f657b2b4219d (diff)
downloadvulkan-31497799058ddd776c1d448ea8931f598e86ae79.tar.gz
vulkan-31497799058ddd776c1d448ea8931f598e86ae79.tar.xz
vulkan-31497799058ddd776c1d448ea8931f598e86ae79.zip
command pool: command buffers now created correctly
vkEndCommandBuffer needs to be called on each command buffer before it can be submitted.
-rw-r--r--vulkan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vulkan.c b/vulkan.c
index 964c000..706a842 100644
--- a/vulkan.c
+++ b/vulkan.c
@@ -722,6 +722,9 @@ static VkCommandPool createcpool(struct cmdbufs *cmdbufs, VkDevice dev, const in
vkCmdBindPipeline(cmdbufs->list[i], VK_PIPELINE_BIND_POINT_GRAPHICS, ppln->ppln);
vkCmdDraw(cmdbufs->list[i], 3, 1, 0, 0);
vkCmdEndRenderPass(cmdbufs->list[i]);
+ res = vkEndCommandBuffer(cmdbufs->list[i]);
+ if (res != VK_SUCCESS)
+ eprintf("Could not record command buffer");
};
return cpool;