ID3D11Device::CreateQuery Method

This interface encapsulates methods for querying information from the GPU.

Syntax

public:
HRESULT CreateQuery(
         const D3D11_QUERY_DESC *pQueryDesc,
         ID3D11Query **ppQuery
)  

Parameters

pQueryDesc
Type: D3D11_QUERY_DESC *

[in] Pointer to a query description (see D3D11_QUERY_DESC).

ppQuery
Type: ID3D11Query **

[out, optional] Address of a pointer to the query object created (see ID3D11Query).

Return value

Type: HRESULT 

This method returns E_OUTOFMEMORY if there is insufficient memory to create the query object. See Direct3D 11 return codes for other possible return values.

Remarks

Create a single query heap for each command list. Individual query heaps only have a single fence value for each query type. This is used by ResolveQueryData to wait for the completion of the last written EndQuery. Using the same query heap across multiple command lists can result in a GPU hang if ResolveQueryData waits for an EndQuery that never gets executed.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11Device

ID3D11Device Members