diff --git a/README.md b/README.md index a2e9df0..7098518 100644 --- a/README.md +++ b/README.md @@ -80,4 +80,3 @@ For faster parallel builds, you can instead generate [ninja](https://ninja-build Finish porting - [ ] shader hot reloading - [ ] descriptor gen -- [ ] acceleration structures diff --git a/rvk/device.cpp b/rvk/device.cpp index 80ce5f7..519b143 100644 --- a/rvk/device.cpp +++ b/rvk/device.cpp @@ -607,11 +607,11 @@ u32 Device::queue_index(Queue_Family family) { void Device::submit(Commands& cmds, u32 index, Fence& fence) { - VkCommandBuffer vk_cmds = cmds; + cmds.end(); VkCommandBufferSubmitInfo cmd_info = {}; cmd_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO; - cmd_info.commandBuffer = vk_cmds; + cmd_info.commandBuffer = cmds; VkSubmitInfo2 submit_info = {}; submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2; @@ -627,6 +627,9 @@ void Device::submit(Commands& cmds, u32 index, Fence& fence) { void Device::submit(Commands& cmds, u32 index, Slice signal, Slice wait, Fence& fence) { + + cmds.end(); + Region(R) { Vec> vk_signal(signal.length()); diff --git a/rvk/rvk.cpp b/rvk/rvk.cpp index 076c954..a099b05 100644 --- a/rvk/rvk.cpp +++ b/rvk/rvk.cpp @@ -439,7 +439,6 @@ void Vk::end_frame(Image_View& output) { frame.cmds.reset(); compositor->render(frame.cmds, state.frame_index, state.swapchain_index, state.has_imgui, output); - frame.cmds.end(); // Wait for frame available before running the submit; signal frame complete on finish frame.wait_for.push(