DXGKDDI_CREATECONTEXT callback function

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

Syntax

DXGKDDI_CREATECONTEXT DxgkddiCreatecontext;

NTSTATUS DxgkddiCreatecontext(
  IN_CONST_HANDLE hDevice,
  INOUT_PDXGKARG_CREATECONTEXT pCreateContext
)
{...}

Parameters

hDevice

[in] 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.

pCreateContext

[in/out] 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

   
Windows version Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dkmddi.h
IRQL PASSIVE_LEVEL

See Also

DXGKARG_CREATECONTEXT

DXGKARG_CREATEDEVICE

DxgkDdiCreateDevice