| 649 | } |
| 650 | |
| 651 | VkResult SubmitCommandBuffer(VkDevice vk_device, VkQueue queue, VkCommandBuffer cmd, VkFence* fence_out) |
| 652 | { |
| 653 | VkResult res = vkEndCommandBuffer(cmd); |
| 654 | if (res != VK_SUCCESS) |
| 655 | { |
| 656 | return res; |
| 657 | } |
| 658 | |
| 659 | VkFenceCreateInfo fence_info = { VK_STRUCTURE_TYPE_FENCE_CREATE_INFO }; |
| 660 | VkFence fence = VK_NULL_HANDLE; |
| 661 | res = vkCreateFence(vk_device, &fence_info, NULL, &fence); |
| 662 | |
| 663 | VkSubmitInfo submit_info = {}; |
| 664 | submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; |
| 665 | submit_info.commandBufferCount = 1; |
| 666 | submit_info.pCommandBuffers = &cmd; |
| 667 | |
| 668 | res = vkQueueSubmit(queue, 1, &submit_info, fence); |
| 669 | if (res != VK_SUCCESS) |
| 670 | { |
| 671 | return res; |
| 672 | } |
| 673 | |
| 674 | *fence_out = fence; |
| 675 | |
| 676 | return res; |
| 677 | } |
| 678 | |
| 679 | VkResult CreateShaderModule(VkDevice vk_device, const void* source, uint32_t sourceSize, VkShaderStageFlagBits stage_flag, ShaderModule* shaderModuleOut) |
| 680 | { |
no outgoing calls
no test coverage detected