PFND3D10DDI_QUERYGETDATA callback function

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

Syntax

PFND3D10DDI_QUERYGETDATA Pfnd3d10ddiQuerygetdata;

void Pfnd3d10ddiQuerygetdata(
   D3D10DDI_HDEVICE,
   D3D10DDI_HQUERY,
  VOID *,
  UINT DataSize,
   UINT
)
{...}

Parameters

D3D10DDI_HDEVICE

D3D10DDI_HQUERY

*

DataSize

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).

UINT

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

   
Windows version Available in Windows Vista and later versions of the Windows operating systems. Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3d10umddi.h (include D3d10umddi.h)

See Also

QueryEnd

pfnSetErrorCb

SetPredication

D3D10DDI_DEVICEFUNCS

CheckCounter

Send comments about this topic to Microsoft