Class QueryHeapDX12
GPU queries heap for DirectX 12 backend.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/GraphicsDevice/DirectX/DX12/QueryHeapDX12.h
Syntax
public class QueryHeapDX12
Constructors
QueryHeapDX12(GPUDeviceDX12* device, const D3D12_QUERY_HEAP_TYPE& queryHeapType, int32 queryHeapCount)
Initializes a new instance of the QueryHeapDX12 class.
Declaration
public QueryHeapDX12(GPUDeviceDX12* device, const D3D12_QUERY_HEAP_TYPE& queryHeapType, int32 queryHeapCount)
Parameters
GPUDeviceDX12
device
The device. |
D3D12_QUERY_HEAP_TYPE
queryHeapType
Type of the query heap. |
int32
queryHeapCount
The query heap count. |
Methods
AllocQuery(GPUContextDX12* context, ElementHandle& handle)
Allocates the query heap element.
Declaration
public void AllocQuery(GPUContextDX12* context, ElementHandle& handle)
Parameters
GPUContextDX12
context
The context. |
ElementHandle
handle
The result handle. |
BeginQuery(GPUContextDX12* context, ElementHandle& handle)
Calls BeginQuery on command list for the given query heap slot.
Declaration
public void BeginQuery(GPUContextDX12* context, ElementHandle& handle)
Parameters
GPUContextDX12
context
The context. |
ElementHandle
handle
The query handle. |
Destroy()
Destroys this instance.
Declaration
public void Destroy()
EndQuery(GPUContextDX12* context, ElementHandle& handle)
Calls EndQuery on command list for the given query heap slot.
Declaration
public void EndQuery(GPUContextDX12* context, ElementHandle& handle)
Parameters
GPUContextDX12
context
The context. |
ElementHandle
handle
The query handle. |
EndQueryBatchAndResolveQueryData(GPUContextDX12* context)
Stops tracking the current batch of begin/end query calls that will be resolved together. This implicitly starts a new batch.
Declaration
public void EndQueryBatchAndResolveQueryData(GPUContextDX12* context)
Parameters
GPUContextDX12
context
The context. |
GetQueryHeapCount()
Gets the query heap capacity.
Declaration
public int32 GetQueryHeapCount() const
Returns
int32
The queries count. |
GetResultBuffer()
Gets the result buffer (CPU readable via Map/Unmap).
Declaration
public ID3D12Resource* GetResultBuffer() const
Returns
ID3D12Resource
The query results buffer. |
GetResultSize()
Gets the size of the result value (in bytes).
Declaration
public int32 GetResultSize() const
Returns
int32
The size of the query result value (in bytes). |
Init()
Initializes this instance.
Declaration
public bool Init()
Returns
bool
True if failed, otherwise false. |
IsReady(ElementHandle& handle)
Determines whether the specified query handle is ready to read data (command list has been executed by the GPU).
Declaration
public bool IsReady(ElementHandle& handle)
Parameters
ElementHandle
handle
The handle. |
Returns
bool
|
ResolveQuery(ElementHandle& handle)
Resolves the query (or skips if already resolved).
Declaration
public void* ResolveQuery(ElementHandle& handle)
Parameters
ElementHandle
handle
The result handle. |
Returns
void
The pointer to the resolved query data. |