MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ read_bytes()

void MayaFlux::Buffers::DataReadProcessor::read_bytes ( size_t  byte_count = 0)

Read the attached buffer's primary storage.

Parameters
byte_countBytes to read, or zero for the full allocation.

Definition at line 59 of file DataReadProcessor.cpp.

60{
61 arm([byte_count](DataReadProcessor& self, const std::shared_ptr<VKBuffer>& vk, PendingRead& pending) {
62 pending.handle = gpu_buffer_handle(vk);
63 return submit_read(pending, self.m_staging, vk->get_size_bytes(), byte_count,
64 vk->is_host_visible(), is_transfer_source(vk));
65 });
66}
static bool submit_read(PendingRead &pending, std::shared_ptr< VKBuffer > &staging, size_t available_bytes, size_t byte_count, bool mapped, bool transferable)
Portal::Graphics::GpuBufferHandle gpu_buffer_handle(const std::shared_ptr< VKBuffer > &buffer)
View a buffer's primary GPU storage without reading it back.
bool is_transfer_source(const std::shared_ptr< VKBuffer > &buffer)
Whether a buffer's memory can be the source of a transfer.

References arm(), MayaFlux::Buffers::gpu_buffer_handle(), MayaFlux::Buffers::DataReadProcessor::PendingRead::handle, MayaFlux::Buffers::is_transfer_source(), m_staging, and submit_read().

Referenced by MayaFlux::Kriya::detail::arm_graphics_read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: