Inherits AZStd::intrusive_base.
|
|
| AZ_TYPE_INFO (Query, "{DC956F7F-5C9C-40FC-9200-D8C75E238135}") |
| |
|
| AZ_CLASS_ALLOCATOR (Query, AZ::SystemAllocator) |
| |
|
| Query (RPI::QueryPool *queryPool, RHI::Interval rhiQueryIndices, RHI::QueryType queryType, RHI::QueryPoolScopeAttachmentType attachmentType, RHI::ScopeAttachmentAccess attachmentAccess) |
| |
|
| Query (Query &&other)=delete |
| |
|
| Query (const Query &other)=delete |
| |
|
Query & | operator= (const Query &other)=delete |
| |
|
RHI::QueryType | GetQueryType () const |
| | Returns the QueryType.
|
| |
|
QueryResultCode | AddToFrameGraph (RHI::FrameGraphInterface frameGraph) |
| | Adds the RHI Query to the scope builder.
|
| |
|
QueryResultCode | BeginQuery (const RHI::FrameGraphExecuteContext &context) |
| | Begins the RHI Query for recording.
|
| |
|
QueryResultCode | EndQuery (const RHI::FrameGraphExecuteContext &context) |
| | Ends the RHI Query for recording.
|
| |
| QueryResultCode | GetLatestResult (void *queryResult, uint32_t resultSizeInBytes, int deviceIndex) |
| |
| template<typename T > |
| QueryResultCode | GetLatestResult (T &queryResult, int deviceIndex) |
| |
| QueryResultCode | GetLatestResultAndWait (void *queryResult, uint32_t resultSizeInBytes, int deviceIndex) |
| |
| template<typename T > |
| QueryResultCode | GetLatestResultAndWait (T &queryResult, int deviceIndex) |
| |
|
void | UnregisterFromPool () |
| | Removes the reference of this instance in the RPI QueryPool where it was created.
|
| |
The RPI Query references multiple RHI Queries by their indices. The amount of referenced RHI Queries depends on the maximum number of GPU frames that can be buffered before the CPU will stall, and the RPI Query's type (RHI Query indices count = QueryType * Maximum buffered GPU frames). The RHI Query indices are divided into multiple SubQueries. Each SubQuery is responsible to readback one or more RHI Queries to calculate a single result, of one frame. The number of RHI Queries referenced by a SubQuery depends on the type of the RPI Query (e.g Timestamps require two RHI Queries for a single result, while PipelineStatistics only require one RHI Query for a single result). When RPI Queries are being recorded (i.e BeginQuery() and EndQuery()), it takes at least one frame for the results of the RPI Query to be available for readback. The RPI Query utilizes the CPU stall that occurs when the amount of buffered frames reaches its limit to ensure that the the RHI Queries that were submitted RHI::Limits::Device::FrameCountMax ago are ready for readback (e.g if an RPI Query is used to record a Timestamp on frame 3, the CPU stall will ensure that the result of the Timestamp will be available on frame 6). The RPI Query will instantiate multiple SubQueries, one for each buffered frame. The SubQuery that is used for recording, will cache the FrameIndex in which it was used for recording.