MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / with_vkb_command_buffer

Method with_vkb_command_buffer

framework/api_vulkan_sample.cpp:1364–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1362}
1363
1364void ApiVulkanSample::with_vkb_command_buffer(const std::function<void(vkb::core::CommandBufferC &command_buffer)> &f)
1365{
1366 auto cmd = get_device().get_command_pool().request_command_buffer();
1367 cmd->begin(VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, VK_NULL_HANDLE);
1368 f(*cmd);
1369 cmd->end();
1370 auto &queue = get_device().get_queue_by_flags(VK_QUEUE_GRAPHICS_BIT, 0);
1371 queue.submit(*cmd, get_device().get_fence_pool().request_fence());
1372 get_device().get_fence_pool().wait();
1373}

Callers

nothing calls this directly

Calls 6

endMethod · 0.80
waitMethod · 0.80
beginMethod · 0.45
submitMethod · 0.45
request_fenceMethod · 0.45

Tested by

no test coverage detected