DxgkDdiOpenAllocation
TOC
Collapse the table of content
Expand the table of content

DxgkDdiOpenAllocation routine

The DxgkDdiOpenAllocation function binds non-device-specific allocations that the DxgkDdiCreateAllocation function created to allocations that are specific to the specified graphics context device.

Syntax


PDXGKDDI_OPENALLOCATIONINFO DxgkDdiOpenAllocation;

NTSTATUS APIENTRY DxgkDdiOpenAllocation(
  _In_ const HANDLE                 hDevice,
  _In_ const DXGKARG_OPENALLOCATION *pOpenAllocation
)
{ ... }

Parameters

hDevice [in]

[in] A handle to the graphics context device that the allocations are bound from. 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.

pOpenAllocation [in]

[in] A pointer to a DXGKARG_OPENALLOCATION structure that contains information about binding allocations.

Return value

DxgkDdiOpenAllocation returns one of the following values:

Return codeDescription
STATUS_SUCCESS

DxgkDdiOpenAllocation successfully bound allocations to the graphics context device that the hDevice parameter specified.

STATUS_INVALID_PARAMETER

Parameters that were passed to DxgkDdiOpenAllocation contained errors that prevented it from completing.

STATUS_NO_MEMORY

DxgkDdiOpenAllocation 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 DxgkDdiOpenAllocation (that is, supplied private data to the display miniport driver).

 

Remarks

The DirectX graphics kernel subsystem calls the display miniport driver's DxgkDdiOpenAllocation function to bind nondevice-specific allocations that the DxgkDdiCreateAllocation function created to allocations that are specific to the graphics context device that the hDevice parameter specifies. The display miniport driver binds allocations to a device so the driver can keep track of allocation data that is specific to a device.

The display miniport driver can bind an allocation to any device that any process (on the same graphics adapter) created and not just to a device in the creating process.

When DxgkDdiOpenAllocation returns STATUS_SUCCESS, the driver sets the hDeviceSpecificAllocation member of the DXGK_OPENALLOCATIONINFO structure for each allocation to a non-NULL value. The DXGK_OPENALLOCATIONINFO structure for each allocation is an element of the array that the pOpenAllocation member of the DXGKARG_OPENALLOCATION structure specifies.

The driver can modify the allocation private driver data that is passed in the pPrivateDriverData member of the DXGK_OPENALLOCATIONINFO structure only when the allocation is created (which is indicated when the Create bit-field flag in the Flags member of the DXGKARG_OPENALLOCATION structure is set). The driver should determine that it can only read the allocation private driver data when the allocation is opened (that is, when the Create bit-field flag is not set).

DxgkDdiOpenAllocation 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

DxgkDdiCreateAllocation
DxgkDdiCreateDevice
DXGK_OPENALLOCATIONINFO
DXGKARG_CREATEDEVICE
DXGKARG_OPENALLOCATION

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft