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

Method copy_buffer_impl

framework/core/device.h:503–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501
502template <vkb::BindingType bindingType>
503inline void Device<bindingType>::copy_buffer_impl(
504 vk::Device device, vkb::core::BufferCpp const &src, vkb::core::BufferCpp &dst, vk::Queue queue, vk::BufferCopy const *copy_region)
505{
506 vk::CommandBuffer command_buffer = create_command_buffer_impl(device, vk::CommandBufferLevel::ePrimary, true);
507
508 vk::BufferCopy buffer_copy;
509 if (copy_region == nullptr)
510 {
511 buffer_copy.size = src.get_size();
512 }
513 else
514 {
515 buffer_copy = *copy_region;
516 }
517
518 command_buffer.copyBuffer(src.get_handle(), dst.get_handle(), buffer_copy);
519
520 flush_command_buffer_impl(device, command_buffer, queue);
521}
522
523template <vkb::BindingType bindingType>
524inline vk::CommandBuffer Device<bindingType>::create_command_buffer_impl(vk::Device device, vk::CommandBufferLevel level, bool begin) const

Callers

nothing calls this directly

Calls 2

get_sizeMethod · 0.45
get_handleMethod · 0.45

Tested by

no test coverage detected