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

◆ begin_timestamp()

void MayaFlux::Portal::Graphics::ShaderFoundry::begin_timestamp ( CommandBufferID  cmd_id,
const std::string &  label = "" 
)

Definition at line 994 of file ShaderFoundry.cpp.

995{
996 auto it = m_command_buffers.find(cmd_id);
997 if (it == m_command_buffers.end()) {
998 return;
999 }
1000
1001 if (!it->second.timestamp_pool) {
1002 vk::QueryPoolCreateInfo pool_info;
1003 pool_info.queryType = vk::QueryType::eTimestamp;
1004 pool_info.queryCount = 128;
1005 it->second.timestamp_pool = get_device().createQueryPool(pool_info);
1006 }
1007
1008 auto query_index = static_cast<uint32_t>(it->second.timestamp_queries.size() * 2);
1009 it->second.timestamp_queries[label] = query_index;
1010
1011 it->second.cmd.resetQueryPool(it->second.timestamp_pool, query_index, 2);
1012 it->second.cmd.writeTimestamp(vk::PipelineStageFlagBits::eTopOfPipe, it->second.timestamp_pool, query_index);
1013}
std::unordered_map< CommandBufferID, CommandBufferState > m_command_buffers

References get_device(), and m_command_buffers.

+ Here is the call graph for this function: