Expand Minimize

DxgkDdiCreateContext routine

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

Syntax


PDXGKDDI_CREATECONTEXT DxgkDdiCreateContext;

NTSTATUS APIENTRY DxgkDdiCreateContext(
  _In_     const HANDLE hDevice,
  _Inout_  DXGKARG_CREATECONTEXT *pCreateContext
)
{ ... }

Parameters

hDevice [in]

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

[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 codeDescription
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

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dkmddi.h (include D3dkmddi.h)

IRQL

PASSIVE_LEVEL

See also

DXGKARG_CREATECONTEXT
DXGKARG_CREATEDEVICE
DxgkDdiCreateDevice

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft