DXGKDDI_CREATEDEVICE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dkmddi.h

DXGKDDI_CREATEDEVICE DxgkddiCreatedevice;

NTSTATUS DxgkddiCreatedevice(
  IN_CONST_HANDLE hAdapter,
  INOUT_PDXGKARG_CREATEDEVICE pCreateDevice
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dkmddi-dxgkddi_createdevice)

DXGKDDI_CREATEDEVICE callback function

Description

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

Parameters

hAdapter

[in] A handle to a context block that is associated with a display adapter. The display miniport driver previously provided this handle to Dxgkrnl in the MiniportDeviceContext output parameter of the DxgiDdiAddDevice function.

pCreateDevice

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

Return value

DXGKDDI_CREATEDEVICE returns one of the following values:

Return code Description
STATUS_SUCCESS DXGKDDI_CREATEDEVICE successfully created the graphics context device.
STATUS_NO_MEMORY DXGKDDI_CREATEDEVICE could not allocate memory that was required for it to complete.

Remarks

Dxgkrnl calls the display miniport driver's DXGKDDI_CREATEDEVICE 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.

DXGKDDI_CREATEDEVICE should be made pageable.

See also

DXGKARG_CREATEDEVICE

DXGKDDI_ADD_DEVICE