D3DDDI_ALLOCATIONINFO structure (d3dukmdt.h)

The D3DDDI_ALLOCATIONINFO structure describes an allocation.

Syntax

typedef struct _D3DDDI_ALLOCATIONINFO {
  [out]    D3DKMT_HANDLE                  hAllocation;
  void                           D3DKMT_PTR(
    const VOID *unnamedParam1,
    pSystemMem unnamedParam2
  );
  void                           D3DKMT_PTR(
    VOID               *unnamedParam1,
    pPrivateDriverData unnamedParam2
  );
  [in]     UINT                           PrivateDriverDataSize;
  [in]     D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
  union {
    struct {
      UINT Primary : 1;
      UINT Stereo : 1;
#if ...
      UINT Reserved : 30;
#else
      UINT Reserved : 31;
#endif
    };
             UINT Value;
  } Flags;
} D3DDDI_ALLOCATIONINFO;

Members

[out] hAllocation

A D3DKMT_HANDLE data type that represents a kernel-mode handle to the allocation. This kernel-mode allocation handle is associated with the kernel-mode resource handle (if non-NULL) that the Microsoft Direct3D runtime's pfnAllocateCb function returns in the hKMResource member of the D3DDDICB_ALLOCATE structure. The user-mode display driver can use this kernel-mode allocation handle to reference the allocation in the command buffer.

void D3DKMT_PTR( const VOID *unnamedParam1, pSystemMem unnamedParam2)

void D3DKMT_PTR( VOID *unnamedParam1, pPrivateDriverData unnamedParam2)

[in] PrivateDriverDataSize

The size, in bytes, of the block of private data that pPrivateDriverData points to.

[in] VidPnSourceId

The zero-based identification number of the video present source in a path of a video present network (VidPN) topology if the allocation is for the primary surface. The driver should set VidPnSourceId only for primary allocation types and not for any other type of allocation. If the driver sets VidPnSourceId for any other allocation type in a call to the pfnAllocateCb function, pfnAllocateCb returns D3DDDI_ID_NOTAPPLICABLE.

When the DirectX graphics kernel subsystem initiates the creation of the allocation for the shared primary surface, the display miniport driver can determine the identification number from the VidPnSourceId member of the D3DKMDDI_SHAREDPRIMARYSURFACEDATA structure that the pPrivateDriverData member of the DXGK_ALLOCATIONINFO structure points to.

[in] Flags

A union that contains either a structure (with the first three members that are described in the following list) or a 32-bit value (in the Value member) that indentifies the type of allocation:

[in] Flags.Primary

A UINT that specifies whether the allocation is part of the desktop. Such an allocation is implicitly accessible to the CPU. A primary allocation can be either pinned down at creation or not pinned down at creation.

Setting this member is equivalent to setting the first bit of the 32-bit Value member (0x00000001).

[in] Flags.Stereo

Supported beginning with Windows 8.

A UINT that specifies whether the allocation is a stereo primary allocation. The Stereo member can be set only when the Primary member is set.

Setting this member is equivalent to setting the second bit of the 32-bit Value member (0x00000002).

[in] Flags.Reserved

Supported beginning with Windows 8.

This member is reserved and should be set to zero.

Setting this member to zero is equivalent to setting the remaining 30 bits (0xFFFFFFFC) of the 32-bit Value member to zeros.

[in] This member is reserved and should be set to zero.

Setting this member to zero is equivalent to setting the remaining 31 bits (0xFFFFFFFE) of the 32-bit Value member to zeros.

[in] Flags.Value

A 32-bit value that identifies the type of allocation.

Remarks

When the user-mode display driver sets the Primary bit-field flag in the Flags member of D3DDDI_ALLOCATIONINFO, certain restrictions apply to the DXGK_ALLOCATIONINFO structure in the pAllocationInfo member of the DXGKARG_CREATEALLOCATION structure for the allocation in a call to the display miniport driver's DxgkDdiCreateAllocation function. These restrictions include the following:

  • The allocation is allocated according to preferences; otherwise, the allocation defaults to the supported write segment set, and all of the specified segments in the write segment set must be CPU-accessible.
  • The display miniport driver cannot set the following bit-field flags in the Flags member of DXGK_ALLOCATIONINFO:
    • PermanentSysMem
    • Cached
    • Protected
    • ExistingSysMem
    • ExistingKernelSysMem
The D3DDDI_ID_NOTAPPLICABLE constant is defined in D3dukmdt.h.

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header d3dukmdt.h (include D3dumddi.h, D3dkmddi.h)

See also

CreateResource

D3DDDICB_ALLOCATE

D3DDDI_SURFACEINFO

D3DKMDDI_SHAREDPRIMARYSURFACEDATA

DXGKARG_CREATEALLOCATION

DXGK_ALLOCATIONINFO

DxgkDdiCreateAllocation

pfnAllocateCb