Expand Minimize

DxgkDdiCalibrateGpuClock routine

Called by the Microsoft DirectX graphics kernel subsystem to calibrate the GPU time stamps in the DXGK_HISTORY_BUFFER history buffer with the CPU clock time.

Syntax


PDXGKDDI_CALIBRATEGPUCLOCK DxgkDdiCalibrateGpuClock;

_Check_return NTSTATUS APIENTRY* DxgkDdiCalibrateGpuClock(
  _In_  const HANDLE                    hAdapter,
  _In_        UINT32                    NodeOrdinal,
  _In_        UINT32                    EngineOrdinal,
  _Out_       DXGKARG_CALIBRATEGPUCLOCK *pClockCalibration
)
{ ... }

Parameters

hAdapter [in]

A handle to the adapter object for the GPU for which timing calibration info is to be obtained.

The display miniport driver previously provided this handle to the DirectX graphics kernel subsystem in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

NodeOrdinal [in]

An index of a node for which timing calibration info will be obtained. This node is within the physical adapter defined by the hAdapter parameter.

EngineOrdinal [in]

The zero-based index of the engine, within the node that NodeOrdinal specifies, for which timing calibration info will be obtained. For graphics adapters that are not part of a link in a linked display adapter (LDA) configuration, you should always set EngineOrdinal to 0.

pClockCalibration [out]

A pointer to a DXGKARG_CALIBRATEGPUCLOCK structure that provides clock counter info from the GPU and CPU.

Return value

Returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

The DirectX graphics kernel subsystem uses the returned info in the pClockCalibration parameter to estimate the drift between the GPU and CPU clocks.

To minimize calibration inaccuracies, the driver should compute the values for the GpuClockCounter and CpuClockCounter members of the DXGKARG_CALIBRATEGPUCLOCK structure as nearly simultaneously as possible.

The DirectX graphics kernel subsystem calls this function often enough, typically at least once every 30ms, to minimize the accumulated drift between the GPU and CPU clocks.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Target platform

Desktop

Version

WDDM 1.3

Header

D3dkmddi.h (include D3dkmddi.h)

IRQL

DISPATCH_LEVEL

See also

DXGK_HISTORY_BUFFER
DxgkDdiAddDevice
DXGKARG_CALIBRATEGPUCLOCK

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft