MayaFlux 1.0.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 1398 of file ShaderFoundry.cpp.

1399{
1400 auto it = m_command_buffers.find(cmd_id);
1401 if (it == m_command_buffers.end()) {
1402 return;
1403 }
1404
1405 if (!it->second.timestamp_pool) {
1406 vk::QueryPoolCreateInfo pool_info;
1407 pool_info.queryType = vk::QueryType::eTimestamp;
1408 pool_info.queryCount = 128;
1409 it->second.timestamp_pool = get_device().createQueryPool(pool_info);
1410 }
1411
1412 auto query_index = static_cast<uint32_t>(it->second.timestamp_queries.size() * 2);
1413 it->second.timestamp_queries[label] = query_index;
1414
1415 it->second.cmd.resetQueryPool(it->second.timestamp_pool, query_index, 2);
1416 it->second.cmd.writeTimestamp(vk::PipelineStageFlagBits::eTopOfPipe, it->second.timestamp_pool, query_index);
1417}
uint32_t label
Definition Contours.cpp:16
vk::Device get_device() const
Get logical device handle.
std::unordered_map< CommandBufferID, CommandBufferState > m_command_buffers

References get_device(), label, and m_command_buffers.

+ Here is the call graph for this function: