DXGKCB_AGP_ALLOCATE_POOL callback function (dispmprt.h)

The DXGKCB_AGP_ALLOCATE_POOL callback function reserves, commits, and maps Accelerated Graphics Port (AGP) memory.

Syntax

DXGKCB_AGP_ALLOCATE_POOL DxgkcbAgpAllocatePool;

NTSTATUS DxgkcbAgpAllocatePool(
  [in]  IN HANDLE Context,
  [in]  IN ULONG AllocationSize,
  [in]  IN MEMORY_CACHING_TYPE CacheType,
  [out] OUT PPHYSICAL_ADDRESS PhysicalAddress,
  [out] OUT PVOID *VirtualAddress
)
{...}

Parameters

[in] Context

A handle to a context block associated with an AGP interface. The display miniport driver previously received this handle in the Context member of the DXGK_AGP_INTERFACE structure that was filled in by DxgkCbQueryServices.

[in] AllocationSize

The size, in bytes, of the AGP memory to be allocated.

[in] CacheType

A constant from the MEMORY_CACHING_TYPE enumeration that specifies whether the CPU can use caching or write combining when it accesses the allocated AGP memory.

[out] PhysicalAddress

A pointer to a PHYSICAL_ADDRESS structure that receives the base physical address of the AGP allocation. This is the base of the physical address range that the GPU will use to access the AGP memory.

[out] VirtualAddress

A pointer to a variable that receives the base virtual address, in system space, of the AGP allocation. This is the base of the virtual address range that the CPU will use to access the AGP memory.

Return value

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

Remarks

Call AgpAllocatePool in the display miniport driver's DxgkDdiStartDevice function. It is likely that AgpAllocatePool will fail if you call it after DxgkDdiStartDevice has executed.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header dispmprt.h (include Dispmprt.h)
IRQL PASSIVE_LEVEL

See also

AgpFreePool

AgpSetCommand

DXGK_AGP_INTERFACE

DxgkCbQueryServices