DXGKDDI_CREATEMEMORYBASIS - NtDoc

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

DXGKDDI_CREATEMEMORYBASIS DxgkddiCreatememorybasis;

HANDLE DxgkddiCreatememorybasis(
  IN_CONST_HANDLE hAdapter,
  IN_CONST_PDXGKARG_CREATEMEMORYBASIS pArgs
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

Description

KMD's DxgkDdiCreateMemoryBasis function creates a handle for a collection of memory ranges that represent the allocation being operated on during dirty bit tracking.

Parameters

hAdapter

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

pArgs

[in] A pointer to a DXGKARG_CREATEMEMORYBASIS structure that contains information for the basis being created.

Return value

DxgkDdiCreateMemoryBasis returns a HANDLE to KMD's reference for tracking the collection of ranges. KMD should be able to transform this information into the information of the basis in subsequent commands like DxgkDdiDestroyMemoryBasis.

Remarks

The tracking of modify operations on VRAM is for allocations that might not be backed contiguously. So the physical addresses represented in the tracking of dirty bits consists of a collection of ranges representing the allocation being operated on. DxgkDdiCreateMemoryBasis returns a handle to KMD's reference for tracking these ranges.

The KMD can rely on the following invariants:

It is also common that SegmentOffset and SizeInBytes will respect certain page alignments when the created memory basis is used in certain dirty tracking DDIs. These values are described on those DDI's reference page, and are always a multiple of DXGK_DIRTY_BIT_TRACKING_SEGMENT_CAPS::PageSize.

Dxgkrnl otherwise doesn't make guarantees about the ordering of the addresses in the collection of Ranges or related assurances.

For more information, see Dirty bit tracking.

See also

DXGKARG_CREATEMEMORYBASIS

DxgkDdiDestroyMemoryBasis