Expand Minimize

DXGK_ALLOCATIONINFO structure

The DXGK_ALLOCATIONINFO structure describes parameters for creating an allocation.

Syntax


typedef struct _DXGK_ALLOCATIONINFO {
  VOID                       *pPrivateDriverData;
  UINT                       PrivateDriverDataSize;
  UINT                       Alignment;
  SIZE_T                     Size;
  SIZE_T                     PitchAlignedSize;
  DXGK_SEGMENTBANKPREFERENCE HintedBank;
  DXGK_SEGMENTPREFERENCE     PreferredSegment;
  UINT                       SupportedReadSegmentSet;
  UINT                       SupportedWriteSegmentSet;
  UINT                       EvictionSegmentSet;
  UINT                       MaximumRenamingListLength;
  HANDLE                     hAllocation;
  DXGK_ALLOCATIONINFOFLAGS   Flags;
  DXGK_ALLOCATIONUSAGEHINT   *pAllocationUsageHint;
  UINT                       AllocationPriority;
} DXGK_ALLOCATIONINFO;

Members

pPrivateDriverData

[in] A pointer to a block of private data. This data is for each allocation and is distinct from the pPrivateDriverData member in the DXGKARG_CREATEALLOCATION structure. The user-mode display driver might pass this data to the display miniport driver. However, if the Microsoft DirectX graphics kernel subsystem passes this data to describe the shared primary or other lockable surface, the data is passed as the first element of the array in the pAllocationInfo member of DXGKARG_CREATEALLOCATION.

PrivateDriverDataSize

[in] The size, in bytes, of the block of private data in pPrivateDriverData.

Alignment

[out] The required alignment, in bytes, for the allocation.

Size

[out] The size, in bytes, that is required for the allocation. The size value is expanded to a multiple of the native host page size (for example, 4 KB on the x86 architecture). The display miniport driver specifies the allocation size to the video memory manager.

PitchAlignedSize

[out] The size, in bytes, of the allocation when it is located in a pitch-aligned segment, which is specified by the PitchAlignment bit-field flag in the Flags member of the DXGK_SEGMENTDESCRIPTOR structure for the segment. If the allocation is not supported in a pitch-aligned segment (graphics processing units [GPUs] commonly do not support this type of segment), the driver should set the value in PitchAlignedSize to zero. If the driver specifies a nonzero value in PitchAlignedSize, the value must be greater than or equal to the value in the Size member.

HintedBank

[out] A DXGK_SEGMENTBANKPREFERENCE structure that indicates the bank ordering preferences that the display miniport driver requests that the video memory manager use to page-in the allocation. If this member is specified, the video memory manager uses banking information about the most preferred segment, which is specified by the SegmentId0 member of the DXGK_SEGMENTPREFERENCE structure that the PreferredSegment member specifies.

PreferredSegment

[out] A DXGK_SEGMENTPREFERENCE structure that indicates preferred segments identifiers that the display miniport driver requests that the video memory manager use to page-in the allocation.

SupportedReadSegmentSet

[out] Segment identifiers that the display miniport driver can set in the PreferredSegment member for read operations. The segments that these identifiers indicate are segments that the display miniport driver requests that the video memory manager use to page-in the allocation for read operations, regardless of performance. Setting bit 0 indicates that the first segment is supported, setting bit 1 indicates that the second segment is supported, and so on.

The display miniport driver can set preferences only for segments that are supported for read operations. The video memory manager asserts if the driver attempts to set preferences for unsupported segments in the PreferredSegment member.

SupportedWriteSegmentSet

[out] Segment identifiers that the display miniport driver can set in the PreferredSegment member for write operations. The segments that these identifiers indicate are segments that the display miniport driver requests that the video memory manager use to page-in the allocation for write operations, regardless of performance. Setting bit 0 indicates that the first segment is supported, setting bit 1 indicates that the second segment is supported, and so on.

The display miniport driver can set preferences only for segments that are supported for write operations. The video memory manager asserts if the driver attempts to set preferences for unsupported segments in the PreferredSegment member.

EvictionSegmentSet

[out] Identifiers of segments that can be used for eviction. Setting bit 0 indicates that the first segment can be used for eviction, setting bit 1 indicates that the second segment can be used for eviction, and so on.

Only aperture segments can be specified by this member. If the driver specifies valid segments to be used for eviction, the video memory manager attempts to allocate resources in those aperture segments to accelerate the eviction process. If the driver specifies 0, the video memory manager calls the driver to transfer the content of an allocation directly to paged-locked system memory without mapping the underlying pages through an aperture segment.

MaximumRenamingListLength

[out] The maximum length of the renaming list for the allocation. For more information about the renaming list, see Requesting to Rename an Allocation.

hAllocation

[out] A handle to the allocation. The display miniport driver must set this member to a value that it can use to refer to its private tracking structure for the allocation.

Flags

[out] A DXGK_ALLOCATIONINFOFLAGS structure that identifies properties for an allocation in bit-field flags. These properties indicate the type of allocation to create. The display miniport driver specifies these flags for the video memory manager.

pAllocationUsageHint

[out] A pointer to a DXGK_ALLOCATIONUSAGEHINT structure that the memory manager uses to determine how to use the allocation.

AllocationPriority

[out] A UINT value that specifies the starting priority level of the allocation.

The driver determines the appropriate priority level for each allocation. For more information about priority levels, see the Remarks section of the pfnSetPriorityCb function. If priority level for allocations is not an issue to the driver, the driver should set all priority levels to D3DDDI_ALLOCATIONPRIORITY_NORMAL. Note that 0 is an invalid initial allocation priority.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dkmddi.h (include D3dkmddi.h)

See also

D3DKMDDI_SHAREDPRIMARYSURFACEDATA
DXGK_ALLOCATIONINFOFLAGS
DXGK_ALLOCATIONLIST
DXGK_ALLOCATIONUSAGEHINT
DXGK_SEGMENTBANKPREFERENCE
DXGK_SEGMENTDESCRIPTOR
DXGK_SEGMENTPREFERENCE
DXGKARG_CREATEALLOCATION
DxgkDdiCreateAllocation
DxgkDdiRender
pfnAllocateCb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.