Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ID3D10Query interface

A query interface queries information from the GPU.

Members

The ID3D10Query interface inherits from ID3D10Asynchronous. ID3D10Query also has these types of members:

Methods

The ID3D10Query interface has these methods.

MethodDescription
GetDesc

Get a query description.

 

Remarks

A query can be created with ID3D10Device::CreateQuery.

This interface inherits the functionality of an ID3D10Asynchronous Interface.

Query data is typically gathered by issuing an ID3D10Asynchronous::Begin command, issuing some graphics commands, issuing an ID3D10Asynchronous::End command, and then calling ID3D10Asynchronous::GetData to get data about what happened in between the Begin and End calls. The data returned by GetData will be different depending on the type of query.

There are, however, some queries that do not require calls to Begin. For a list of possible queries see D3D10_QUERY.

A query is typically executed as shown in the following code:


D3D10_QUERY_DESC queryDesc;

... // Fill out queryDesc structure

ID3D10Query * pQuery;
pDevice->CreateQuery(&queryDesc, &pQuery);

pQuery->Begin();

... // Issue graphis commands, do whatever

pQuery->End();

UINT64 queryData; // This data type is different depending on the query type

while( S_OK != pQuery->GetData(&queryData, sizeof(UINT64), 0) )
{
}


When using a query that does not require a call to Begin, it still requires a call to End. The call to End causes the data returned by GetData to be accurate up until the last call to End.

Requirements

Header

D3D10.h

Library

D3D10.lib

See also

ID3D10Asynchronous
Core Interfaces

 

 

Community Additions

ADD
Show:
© 2015 Microsoft