Expand Minimize

QueryGetData routine

The QueryGetData function polls for the state of a query operation.

Syntax


PFND3D10DDI_QUERYGETDATA QueryGetData;

VOID APIENTRY QueryGetData(
  _In_   D3D10DDI_HDEVICE hDevice,
  _In_   D3D10DDI_HQUERY hQuery,
  _Out_  VOID *pData,
  _Out_  UINT DataSize,
  _In_   UINT Flags
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

hQuery [in]

A handle to the query object to poll.

pData [out]

A pointer to a region of memory that receives the data from a query operation. The user-mode display driver can set pData to NULL and set the DataSize parameter to zero. If pData is NULL, QueryGetData can indicate the state of the query operation (for example, whether the query operation is finished).

DataSize [out]

The size, in bytes, of the query data that the pData parameter points to. The user-mode display driver can set DataSize to zero and set pData to NULL. If DataSize is zero, QueryGetData can indicate the state of the query operation (for example, through return codes).

Flags [in]

A bitwise OR of values. Currently, the D3D10_DDI_GET_DATA_DO_NOT_FLUSH (0x01L) value from the D3D10_DDI_GET_DATA_FLAG enumeration type is the only supported value.

Return value

None

The driver can use the pfnSetErrorCb callback function to set an error code. For more information about setting error codes, see the Remarks section.

Remarks

After the Microsoft Direct3D runtime calls the user-mode display driver's QueryEnd function to transition a query operation to the "issued" state, the runtime can call QueryGetData to determine if the query operation is still in the "issued" state (DXGI_DDI_ERR_WASSTILLDRAWING) or has transitioned to the "signaled" state (S_OK). If the query operation is in the "signaled" state, QueryGetData can return the query data in the pData parameter; otherwise, pData is unchanged. The driver can call pfnSetErrorCb to indicate the state of the query operation.

The runtime cannot call QueryGetData with a predicate that was created with D3D10_QUERY_MISCFLAG_PREDICATEHINT through a call to the SetPredication function.

If a query operation handles work that still resides in partial command buffers, by default, the driver should terminate and submit the partial command buffers. However, the driver should not terminate and submit the buffers if the runtime specified the D3D10_DDI_GET_DATA_DO_NOT_FLUSH flag in the Flags parameter. If the runtime passed the D3D10_DDI_GET_DATA_DO_NOT_FLUSH flag in the Flags parameter and if the query operation handles work that still resides in partial command buffers, the driver can call pfnSetErrorCb to set only the DXGI_DDI_ERR_WASSTILLDRAWING error code.

When the runtime calls QueryGetData to check for query completion, the driver can pass DXGI_DDI_ERR_WASSTILLDRAWING in a call to pfnSetErrorCb to indicate that the query is not finished yet. The driver can also pass D3DDDIERR_DEVICEREMOVED in a call to pfnSetErrorCb. The Direct3D runtime will determine that any other errors are critical.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3d10umddi.h (include D3d10umddi.h)

See also

CheckCounter
D3D10DDI_DEVICEFUNCS
pfnSetErrorCb
QueryEnd
SetPredication

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft