Allocates graphics memory. This method is deprecated from the Februrary 2014 XDK. Use XMemAlloc or VirtualAlloc instead.
HRESULT D3DAllocateGraphicsMemory(
SIZE_T SizeBytes,
SIZE_T AlignmentBytes,
UINT64 DesiredGpuVirtualAddress,
UINT Flags,
VOID **ppAddress
)
SizeBytes
Type: SIZE_T
[in] Size of the new allocation, in bytes.
Must be a multiple of 4KB.
AlignmentBytes
Type: SIZE_T
[in] Alignment of the new allocation in bytes.
Must be a power of 2, and must be at least 4KB. Specify 0 for default alignment (4KB). When DesiredGpuVirtualAddress is not 0, AlignmentBytes must be 0.
DesiredGpuVirtualAddress
Type: UINT64
[in] The desired GPU virtual address of the new allocation.
If the GPU virtual address space at DesiredGpuVirtualAddress has been reserved by another allocation, then this call will fail with E_OUTOFMEMORY.
To have the system assign a GPU virtual address aligned to AlignmentBytes, pass 0 for DesiredGpuVirtualAddress.
If DesiredGpuVirtualAddress is not 0, then it must be above the driver reserved virtual address range of 0MB - 2048MB.
Flags
Type: UINT
[in] A flag to control whether memory is CPU-cached and whether memory is coherent between the CPU and GPU.
This is a single enumeration constant in the enumeration D3D11_GRAPHICS_MEMORY_ACCESS_FLAG.
ppAddress
Type: VOID **
[out] The CPU virtual address assigned to the new allocation, upon success. In other Windows platforms (d3d11_1.h), this argument is named ppCpuVirtualAddress.
Note that D3DFreeGraphicsMemory is deprecated.
Type: HRESULT
Header: Declared in d3d11_x.h (d3d11_1.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).