PFND3D10DDI_QUERYGETDATA callback function (d3d10umddi.h)
The QueryGetData function polls for the state of a query operation.
Syntax
PFND3D10DDI_QUERYGETDATA Pfnd3d10ddiQuerygetdata;
void Pfnd3d10ddiQuerygetdata(
D3D10DDI_HDEVICE unnamedParam1,
D3D10DDI_HQUERY unnamedParam2,
VOID *unnamedParam3,
UINT DataSize,
UINT unnamedParam5
)
{...}
Parameters
unnamedParam1
hDevice [in]: A handle to the display device (graphics context).
unnamedParam2
hQuery [in]: A handle to the query object to poll.
unnamedParam3
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).
unnamedParam5
Flags [in]: D3D10_DDI_GET_DATA_FLAG flags.
Return value
None
Remarks
The driver can use the pfnSetErrorCb callback function to set an error code.
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Target Platform | Desktop |
Header | d3d10umddi.h (include D3d10umddi.h) |