MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / EndQuery

Method EndQuery

Source/Engine/GraphicsDevice/Vulkan/GPUContextVulkan.cpp:1357–1380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1355}
1356
1357void GPUContextVulkan::EndQuery(uint64 queryID)
1358{
1359 if (!queryID)
1360 return;
1361 GPUQueryVulkan query;
1362 query.Raw = queryID;
1363 auto pool = _device->QueryPools[query.PoolIndex];
1364
1365 // End query
1366 const auto cmdBuffer = _cmdBufferManager->GetCmdBuffer();
1367 switch (pool->Type)
1368 {
1369 case GPUQueryType::Timer:
1370 vkCmdWriteTimestamp(cmdBuffer->GetHandle(), VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, pool->GetHandle(), query.SecondQueryIndex);
1371 pool->MarkQueryAsStarted(query.SecondQueryIndex);
1372#if GPU_VULKAN_PAUSE_QUERIES
1373 _cmdBufferManager->OnTimerQueryEnd(query.Raw);
1374#endif
1375 break;
1376 case GPUQueryType::Occlusion:
1377 vkCmdEndQuery(cmdBuffer->GetHandle(), pool->GetHandle(), query.QueryIndex);
1378 break;
1379 }
1380}
1381
1382void GPUContextVulkan::SetViewport(const Viewport& viewport)
1383{

Callers 6

D3D12ZoneScopeClass · 0.45
D3D12ZoneScopeMethod · 0.45
EndAllQueriesMethod · 0.45
EndEventMethod · 0.45
EndMethod · 0.45
runMethod · 0.45

Calls 4

GetCmdBufferMethod · 0.80
MarkQueryAsStartedMethod · 0.80
OnTimerQueryEndMethod · 0.80
GetHandleMethod · 0.45

Tested by

no test coverage detected