| 26 | /* ----- Command Buffers ----- */ |
| 27 | |
| 28 | void VKCommandQueue::Submit(CommandBuffer& commandBuffer) |
| 29 | { |
| 30 | auto& commandBufferVK = LLGL_CAST(VKCommandBuffer&, commandBuffer); |
| 31 | |
| 32 | VkCommandBuffer commandBuffers[] = { commandBufferVK.GetVkCommandBuffer() }; |
| 33 | |
| 34 | /* Submit command buffer to graphics queue */ |
| 35 | VkSubmitInfo submitInfo; |
| 36 | { |
| 37 | submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; |
| 38 | submitInfo.pNext = nullptr; |
| 39 | submitInfo.waitSemaphoreCount = 0; |
| 40 | submitInfo.pWaitSemaphores = nullptr; |
| 41 | submitInfo.pWaitDstStageMask = 0; |
| 42 | submitInfo.commandBufferCount = 1; |
| 43 | submitInfo.pCommandBuffers = commandBuffers; |
| 44 | submitInfo.signalSemaphoreCount = 0; |
| 45 | submitInfo.pSignalSemaphores = nullptr; |
| 46 | } |
| 47 | auto result = vkQueueSubmit(native_, 1, &submitInfo, commandBufferVK.GetQueueSubmitFence()); |
| 48 | VKThrowIfFailed(result, "failed to submit command buffer to Vulkan graphics queue"); |
| 49 | } |
| 50 | |
| 51 | /* ----- Queries ----- */ |
| 52 | |