D3DDDICB_ALLOCATE structure (d3dumddi.h)

The D3DDDICB_ALLOCATE structure contains information for allocating memory.

Syntax

typedef struct _D3DDDICB_ALLOCATE {
  [in]  const VOID            *pPrivateDriverData;
  [in]  UINT                  PrivateDriverDataSize;
  [in]  HANDLE                hResource;
  [out] D3DKMT_HANDLE         hKMResource;
  [in]  UINT                  NumAllocations;
  union {
    [in]  D3DDDI_ALLOCATIONINFO  *pAllocationInfo;
    [in]  D3DDDI_ALLOCATIONINFO2 *pAllocationInfo2;
  };
  [in]  D3DDDI_ALLOCATIONINFO *pAllocationInfo;
} D3DDDICB_ALLOCATE;

Members

[in] pPrivateDriverData

A pointer to private data, which is passed to the display miniport driver. This data is per resource and not per allocation. If allocations are attached to an existing resource, the current data should overwrite the former data.

[in] PrivateDriverDataSize

The size, in bytes, of the private data that is pointed to by pPrivateDriverData.

[in] hResource

A handle to the resource that is associated with the allocations.

When the user-mode display driver calls the pfnAllocateCb function, the driver should assign the value that was received from the hResource member of the D3DDDIARG_CREATERESOURCE structure in a call to CreateResource, or the hRTResource parameter in a call to CreateResource(D3D10) or CreateResource(D3D11). It should assign the value to associate the allocations with the resource, or assign NULL to associate the allocations with the device. The driver must assign a non-NULL value for allocations that are created in response to shared resources. Shared resources might result from CreateResource calls with the SharedResource bit-field flag set in the Flags member of D3DDDIARG_CREATERESOURCE. They might also result from CreateResource(D3D10) or CreateResource(D3D11) calls, with the D3D10_DDI_RESOURCE_MISC_SHARED value set in the MiscFlags member of either D3D10DDIARG_CREATERESOURCE or D3D11DDIARG_CREATERESOURCE.

The Microsoft Direct3D runtime should use this handle in driver calls to identify the resource.

[out] hKMResource

A D3DKMT_HANDLE data type that represents a kernel-mode handle to the resource that is associated with the allocations.

The Direct3D runtime creates and returns a kernel-mode resource handle only if the user-mode display driver sets the hResource member of D3DDDICB_ALLOCATE to the user-mode runtime resource handle that was received from the hResource member of the D3DDDIARG_CREATERESOURCE structure. This handle is received in a call to CreateResource, or from the hResource parameter in a call to either CreateResource(D3D10) or CreateResource(D3D11).

The Direct3D runtime generates a unique handle and passes it back to the user-mode display driver. The user-mode display driver can insert the kernel-mode resource handle in the command stream for subsequent use by the display miniport driver.

[in] NumAllocations

The number of elements in the array at pAllocationInfo, which represents the number of allocations to allocate.

[in] pAllocationInfo

An array of D3DDDI_ALLOCATIONINFO structures that describe the allocations to allocate.

[in] An array of D3DDDI_ALLOCATIONINFO structures that describe the allocations to allocate.

[in] pAllocationInfo2

This member is reserved and should be set to zero.

This member is available beginning with Windows 7.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header d3dumddi.h (include D3dumddi.h)

See also

CreateResource

CreateResource(D3D10)

CreateResource(D3D11)

D3D10DDIARG_CREATERESOURCE

D3D11DDIARG_CREATERESOURCE

D3DDDIARG_CREATERESOURCE

D3DDDI_ALLOCATIONINFO

pfnAllocateCb