Bewerken

Delen via


DXGKDDI_RESETHWENGINE callback function (d3dkmddi.h)

Dxgkrnl calls the display miniport driver's (KMD's) DxgkDdiResetHwEngine function when a GPU engine reset is required.

Syntax

DXGKDDI_RESETHWENGINE DxgkddiResethwengine;

NTSTATUS DxgkddiResethwengine(
  IN_CONST_HANDLE hAdapter,
  INOUT_PDXGKARG_RESETHWENGINE pResetHwEngine
)
{...}

Parameters

hAdapter

[in] A handle to the context block associated with a display adapter. KMD previously provided this handle to Dxgkrnl in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

pResetHwEngine

[in/out] Pointer to a DXGKARG_RESETHWENGINE structure that contains information to reset the hardware engine.

Return value

DxgkDdiResetHwEngine returns STATUS_SUCCESS if the operation succeeds. Otherwise, it should return an appropriate NTSTATUS error code.

Remarks

A DxgkDdiResetHwEngine implementation should call the DxgkCbInvalidateHwContext callback to inform the OS of all running contexts that were affected by the GPU engine reset operation. The OS will invalidate these context devices (set them in error) and won't perform future submissions.

The engine isn't considered resumed yet after DxgkDdiResetHwEngine is called, so contexts that weren't invalidated aren't allowed to be submitted. The OS needs to re-enable interrupts from this engine and synchronize its state with the reset GPU engine. After that, the OS will enable interrupts and call DxgkDdiResumeHwEngine, which instructs the GPU engine to start scheduling all runnable contexts that weren't affected by the engine reset.

Register your implementation of this callback function in the **DRIVER_INITIALIZATION_DATA ** structure.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703 (WDDM 2.2)
Header d3dkmddi.h

See also

DXGKARG_RESETHWENGINE

DxgkDdiResumeHwEngine