Bewerken

Delen via


DXGKDDI_CREATECONTEXT callback function (d3dkmddi.h)

The DxgkDdiCreateContext function creates a graphics processing unit (GPU) context.

Syntax

DXGKDDI_CREATECONTEXT DxgkddiCreatecontext;

NTSTATUS DxgkddiCreatecontext(
  [in]     IN_CONST_HANDLE hDevice,
  [in/out] INOUT_PDXGKARG_CREATECONTEXT pCreateContext
)
{...}

Parameters

[in] hDevice

A handle to the graphics context device that the new context is created on. The display miniport driver's DxgkDdiCreateDevice function previously provided this handle to the Microsoft DirectX graphics kernel subsystem in the hDevice member of the DXGKARG_CREATEDEVICE structure.

[in/out] pCreateContext

A pointer to a DXGKARG_CREATECONTEXT structure that contains information about creating the context.

Return value

DxgkDdiCreateContext returns one of the following values:

Return code Description
STATUS_SUCCESS DxgkDdiCreateContext successfully created the context.
STATUS_NO_MEMORY DxgkDdiCreateContext could not allocate memory that was required for it to complete.
STATUS_GRAPHICS_DRIVER_MISMATCH The display miniport driver is not compatible with the user-mode display driver that initiated the call to DxgkDdiCreateContext.

Remarks

A driver uses a GPU context to hold a collection of rendering state.

A single process can create multiple contexts on a given device.

The driver must support an arbitrary number of contexts. The only valid reason why a driver could not create a context is if system memory runs out.

Typically, each context can reference any resource that was previously created for the device that owns that context.

DxgkDdiCreateContext should be made pageable.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header d3dkmddi.h
IRQL PASSIVE_LEVEL

See also

DXGKARG_CREATECONTEXT

DXGKARG_CREATEDEVICE

DxgkDdiCreateDevice