DXGKCB_DESTROYCONTEXTALLOCATION callback function

Called by a WDDM 1.2 or later display miniport driver to free a resource that was previously allocated for a GPU or device-specific context.

Syntax

DXGKCB_DESTROYCONTEXTALLOCATION DxgkcbDestroycontextallocation;

NTSTATUS DxgkcbDestroycontextallocation(
  IN_CONST_HANDLE hAdapter,
  IN_CONST_HANDLE hAllocation
)
{...}

Parameters

hAdapter

[in] A handle to the graphics adapter for which the allocation was created. The display miniport driver receives the handle from the DeviceHandle member of the DXGKRNL_INTERFACE structure in a call to its DxgkDdiStartDevice function.

hAllocation

[in] A handle that was assigned by the DirectX graphics subsystem to the allocation. The display miniport driver receives the handle from the hAllocation member of the DXGKARGCB_CREATECONTEXTALLOCATION structure in the call to theDxgkCbCreateContextAllocation function.

Return Value

DxgkCbDestroyContextAllocation returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

The driver allocates context resources by calling DxgkCbCreateContextAllocation.

After the display miniport driver calls DxgkCbCreateContextAllocation to allocate a context resource, it can call DxgkCbDestroyContextAllocation to free the resource at any time.

Requirements

   
Windows version Windows 8 Windows Server 2012
Target Platform Desktop
Header d3dkmddi.h (include D3dkmddi.h)
IRQL PASSIVE_LEVEL

See Also

DXGKARGCB_CREATECONTEXTALLOCATION

DxgkCbCreateContextAllocation