MCPcopy Create free account
hub / github.com/a2flo/floor / execute_secondary_command_buffer

Method execute_secondary_command_buffer

src/device/vulkan/vulkan_queue.cpp:828–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828bool vulkan_queue::execute_secondary_command_buffer(const vulkan_command_buffer& primary_cmd_buffer,
829 const vulkan_command_buffer& secondary_cmd_buffer) const {
830 if (primary_cmd_buffer.is_secondary) {
831 log_error("specified primary cmd buffer is not actually a primary cmd buffer!");
832 return false;
833 }
834 if (!secondary_cmd_buffer.is_secondary) {
835 log_error("specified secondary cmd buffer is not actually a secondary cmd buffer!");
836 return false;
837 }
838
839 vkCmdExecuteCommands(primary_cmd_buffer.cmd_buffer, 1, &secondary_cmd_buffer.cmd_buffer);
840
841 // we need to hold onto the secondary cmd buffer until the primary cmd buffer has completed
842 add_completion_handler(primary_cmd_buffer, [this, sec_cmd_buffer = secondary_cmd_buffer]() {
843 impl->thread_secondary_cmd_pool->release_command_buffer(sec_cmd_buffer);
844 });
845
846 return true;
847}
848
849void vulkan_queue::add_retained_buffers(const vulkan_command_buffer& cmd_buffer,
850 const std::vector<std::shared_ptr<device_buffer>>& buffers) const {

Callers 1

draw_internalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected