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

◆ allocate_gpu_buffers()

void MayaFlux::Buffers::MeshNetworkProcessor::allocate_gpu_buffers ( const std::shared_ptr< VKBuffer > &  vertex_buf)
private

Definition at line 96 of file MeshNetworkProcessor.cpp.

98{
99 const size_t v_bytes = total_vertex_bytes();
100 const size_t i_bytes = total_index_count() * sizeof(uint32_t);
101
102 if (v_bytes == 0 || i_bytes == 0) {
104 "MeshNetworkProcessor::allocate_gpu_buffers: network has no geometry");
105 return;
106 }
107
108 if (!vertex_buf->is_host_visible())
110
111 m_gpu_index_buffer = std::make_shared<VKBuffer>(
115
117 "MeshNetworkProcessor: allocated vertex ({} bytes) + index ({} bytes)",
118 v_bytes, i_bytes);
119}
#define MF_WARN(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
Registry::Service::BufferService * m_buffer_service
Definition VKBuffer.hpp:651
std::shared_ptr< VKBuffer > create_staging_buffer(size_t size)
Create staging buffer for transfers.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
@ UNKNOWN
Unknown or undefined modality.
std::function< void(const std::shared_ptr< void > &)> initialize_buffer
Initialize a buffer object.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Buffers::create_staging_buffer(), MayaFlux::Buffers::VKBuffer::INDEX, MayaFlux::Registry::Service::BufferService::initialize_buffer, MayaFlux::Buffers::VKBufferProcessor::m_buffer_service, m_gpu_index_buffer, m_index_staging, m_vertex_staging, MF_DEBUG, MF_WARN, total_index_count(), total_vertex_bytes(), and MayaFlux::Kakshya::UNKNOWN.

Referenced by on_attach().

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