Export (0) Print
Expand All
Expand Minimize

DxgkDdiCreateDevice routine

The DxgkDdiCreateDevice function creates a graphics context device that is subsequently used in calls to the display miniport driver's device-specific functions.

Syntax


PDXGKDDI_CREATEDEVICE DxgkDdiCreateDevice;

NTSTATUS APIENTRY DxgkDdiCreateDevice(
  _In_     const HANDLE               hAdapter,
  _Inout_  DXGKARG_CREATEDEVICE *pCreateDevice
)
{ ... }

Parameters

hAdapter [in]

[in] A handle to a context block that is associated with a display adapter. The display miniport driver previously provided this handle to the Microsoft DirectX graphics kernel subsystem in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

pCreateDevice [in, out]

[in/out] A pointer to a DXGKARG_CREATEDEVICE structure that describes the graphics context device.

Return value

DxgkDdiCreateDevice returns one of the following values:

Return codeDescription
STATUS_SUCCESS

DxgkDdiCreateDevice successfully created the graphics context device.

STATUS_NO_MEMORY

DxgkDdiCreateDevice could not allocate memory that was required for it to complete.

 

Remarks

The DirectX graphics kernel subsystem calls the display miniport driver's DxgkDdiCreateDevice function to create a graphics context device that the graphics subsystem subsequently passes in calls to the display miniport driver. The driver uses a device to hold a collection of rendering state. The graphics subsystem can create multiple devices in the same process on a given graphics processing unit (GPU) adapter.

Note  The number of devices that can simultaneously exist is limited only by available system memory. That is, a driver cannot have a hard-coded maximum device limit.

Generally, devices are independent of each other; in other words, resources that are created in one device cannot be referenced or accessed by resources that are created in another device. However, cross-process resources are an exception to this rule.

DxgkDdiCreateDevice should be made pageable.

Requirements

Target platform

Desktop

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_CREATEDEVICE
DxgkDdiAddDevice

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft