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

◆ resolve_push_constant_size()

size_t MayaFlux::Buffers::ShaderProcessor::resolve_push_constant_size ( const std::shared_ptr< VKBuffer > &  buffer) const
protected

Byte width of this processor's push constant block, extended to cover any fragment staged on the buffer.

Definition at line 490 of file ShaderProcessor.cpp.

491{
492 size_t size = std::max(m_config.push_constant_size, m_push_constant_data.size());
493
494 for (const auto& entry : buffer->get_pipeline_context().push_constant_bindings) {
495 size = std::max(size, static_cast<size_t>(entry.offset) + entry.data.size());
496 }
497
498 for (const auto& [name, entry] : m_feeds) {
499 if (!entry.is_storage) {
500 size = std::max(size, static_cast<size_t>(entry.offset) + entry.size);
501 }
502 }
503
504 return size;
505}
bool size
std::shared_ptr< NetworkGeometryBuffer > buffer
std::string name
Definition VKDevice.cpp:123
std::vector< uint8_t > m_push_constant_data
std::unordered_map< std::string, Feed > m_feeds

References buffer, m_config, m_feeds, m_push_constant_data, name, MayaFlux::Buffers::ShaderConfig::push_constant_size, and size.

Referenced by MayaFlux::Buffers::ComputeProcessor::initialize_pipeline(), MayaFlux::Buffers::RenderProcessor::initialize_pipeline(), layout_fingerprint(), and resolve_push_constants_into().

+ Here is the caller graph for this function: