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

Method execute_secondary_command_buffer

compute/vulkan/vulkan_queue.cpp:808–827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806}
807
808bool vulkan_queue::execute_secondary_command_buffer(const vulkan_command_buffer& primary_cmd_buffer,
809 const vulkan_command_buffer& secondary_cmd_buffer) const {
810 if (primary_cmd_buffer.is_secondary) {
811 log_error("specified primary cmd buffer is not actually a primary cmd buffer!");
812 return false;
813 }
814 if (!secondary_cmd_buffer.is_secondary) {
815 log_error("specified secondary cmd buffer is not actually a secondary cmd buffer!");
816 return false;
817 }
818
819 vkCmdExecuteCommands(primary_cmd_buffer.cmd_buffer, 1, &secondary_cmd_buffer.cmd_buffer);
820
821 // we need to hold onto the secondary cmd buffer until the primary cmd buffer has completed
822 add_completion_handler(primary_cmd_buffer, [this, sec_cmd_buffer = secondary_cmd_buffer]() {
823 impl->thread_secondary_cmd_pool->release_command_buffer(sec_cmd_buffer);
824 });
825
826 return true;
827}
828
829void vulkan_queue::add_retained_buffers(const vulkan_command_buffer& cmd_buffer,
830 const vector<shared_ptr<compute_buffer>>& buffers) const {

Callers 1

draw_internalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected