Expand Minimize

D3DKMT_CREATEALLOCATION structure

The D3DKMT_CREATEALLOCATION structure describes parameters for creating allocations.

Syntax


typedef struct _D3DKMT_CREATEALLOCATION {
  D3DKMT_HANDLE                hDevice;
  D3DKMT_HANDLE                hResource;
  D3DKMT_HANDLE                hGlobalShare;
  const VOID                   *pPrivateRuntimeData;
  UINT                         PrivateRuntimeDataSize;
  const VOID                   *pPrivateDriverData;
  UINT                         PrivateDriverDataSize;
  UINT                         NumAllocations;
  union {
    D3DDDI_ALLOCATIONINFO  *pAllocationInfo;
#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) || \
     (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN7))
    D3DDDI_ALLOCATIONINFO2 *pAllocationInfo2;
#endif 
  };
  D3DKMT_CREATEALLOCATIONFLAGS Flags;
  HANDLE                       hPrivateRuntimeResourceHandle;
} D3DKMT_CREATEALLOCATION;

Members

hDevice

[in] A handle to the device that the resource or allocation is associated with.

hResource

[in/out] A D3DKMT_HANDLE data type that represents a kernel-mode handle to the resource that is associated with the allocations. The value in hResource should always be zero unless an allocation will be added to an existing resource, in which case hResource contains the resource handle.

When the CreateResource bit-field flag is set in the Flags member, the OpenGL runtime generates a unique handle and passes it back to the driver. On output from the D3DKMTCreateAllocation function, hResource specifies the handle that the driver should use in subsequent OpenGL runtime calls to identify the resource. The resource handle that is returned is device-specific and is valid only when used with the device that it was created on.

hGlobalShare

[out] A handle to the shared resource. The driver should always set the value in hGlobalShare to zero.

When the driver sets the CreateShared bit-field flag in Flags to create a shared resource, the OpenGL runtime generates a shared handle that is unique across all of the devices and passes it back to the driver in hGlobalShare.

Note  If you set CreateShared, you must also set the CreateResource bit-field flag.

pPrivateRuntimeData

[in] A pointer to optional private data that can be attached to a resource for debugging purposes. This data is per resource and not per allocation.

PrivateRuntimeDataSize

[in] The size, in bytes, of the private data that pPrivateRuntimeData points to.

pPrivateDriverData

[in] A pointer to a buffer that contains optional private data that the display miniport driver might require to create the resource or allocation. The contents of the buffer typically come from the OpenGL ICD and must be in a format that the display miniport driver can process.

PrivateDriverDataSize

[in/out] The size, in bytes, of the private data that pPrivateDriverData points to.

NumAllocations

[in] The number of elements in the array that pAllocationInfo specifies, which represents the number of allocations to create. Note that creating a resource without any allocations initially associated with it is valid; therefore, NumAllocations can be set to 0.

pAllocationInfo

[in] An array of D3DDDI_ALLOCATIONINFO structures that describe specific properties for each allocation to create.

pAllocationInfo2

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

This member is available beginning with Windows 7.

Flags

[in] A D3DKMT_CREATEALLOCATIONFLAGS structure that identifies attributes for creating the allocation, in bit-field flags.

Note  If you set the CreateShared bit-field flag in Flags, you must also set the CreateResource bit-field flag.

hPrivateRuntimeResourceHandle

[in] An opaque handle that you can use in event tracing. This handle can be used to associate kernel-mode allocations with user-mode surface pointers when you analyze Event Tracing for Windows (ETW) event logs.

Requirements

Version

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

Header

D3dkmthk.h (include D3dkmthk.h)

See also

D3DDDI_ALLOCATIONINFO
D3DKMT_CREATEALLOCATIONFLAGS
D3DKMTCreateAllocation

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.