Plasma Engine  2.0
Loading...
Searching...
No Matches
plQueryPoolVulkan Class Reference

Pool for GPU queries. More...

#include <QueryPoolVulkan.h>

Public Member Functions

 plQueryPoolVulkan (plGALDeviceVulkan *pDevice)
 
void Initialize (plUInt32 uiValidBits)
 Initializes the pool.
 
void DeInitialize ()
 
void BeginFrame (vk::CommandBuffer commandBuffer)
 Needs to be called every frame so the pool can figure out which queries have finished and reuse old data.
 
plGALTimestampHandle InsertTimestamp (vk::CommandBuffer commandBuffer, vk::PipelineStageFlagBits pipelineStage=vk::PipelineStageFlagBits::eBottomOfPipe)
 Inserts a timestamp into the given command buffer.
 
plEnum< plGALAsyncResultGetTimestampResult (plGALTimestampHandle hTimestamp, plTime &out_result, bool bForce=false)
 Retrieves the timestamp value if it is available.
 
plGALPoolHandle BeginOcclusionQuery (vk::CommandBuffer commandBuffer, plEnum< plGALQueryType > type)
 
void EndOcclusionQuery (vk::CommandBuffer commandBuffer, plGALPoolHandle hPool)
 
plEnum< plGALAsyncResultGetOcclusionQueryResult (plGALPoolHandle hPool, plUInt64 &out_uiQueryResult, bool bForce=false)
 

Detailed Description

Pool for GPU queries.

Member Function Documentation

◆ GetTimestampResult()

plEnum< plGALAsyncResult > plQueryPoolVulkan::GetTimestampResult ( plGALTimestampHandle hTimestamp,
plTime & out_result,
bool bForce = false )

Retrieves the timestamp value if it is available.

Parameters
hTimestampThe target timestamp to resolve.
resultThe time of the timestamp. If this is empty on success the timestamp has expired.
bForceWait for the timestamp to become available.
Returns
Returns false if the result is not available yet.

◆ Initialize()

void plQueryPoolVulkan::Initialize ( plUInt32 uiValidBits)

Initializes the pool.

Parameters
uiValidBitsThe number of valid bits in the query result. Each queue has different query characteristics and a separate pool is needed for each queue.

◆ InsertTimestamp()

plGALTimestampHandle plQueryPoolVulkan::InsertTimestamp ( vk::CommandBuffer commandBuffer,
vk::PipelineStageFlagBits pipelineStage = vk::PipelineStageFlagBits::eBottomOfPipe )

Inserts a timestamp into the given command buffer.

Parameters
commandBufferTarget command buffer to insert the timestamp into.
hTimestampTimestamp to insert. After insertion the only valid option is to call GetTimestampResult.
pipelineStageThe value of the timestamp will be the point in time in which all previously committed commands have finished this stage.

The documentation for this class was generated from the following files: