Sets an allocation callback function for the command allocator.
public:
void SetAllocatorCallbackX(
D3D12XBOX_COMMAND_ALLOCATOR_CALLBACK pCallback,
UINT64 Context
)
pCallback
Type: D3D12XBOX_COMMAND_ALLOCATOR_CALLBACK
[in] A pointer to a D3D12XBOX_COMMAND_ALLOCATOR_CALLBACK definition. Note that D3D12XBOX_COMMAND_ALLOCATOR_CALLBACK is defined as:
typedef void* (*D3D12XBOX_COMMAND_ALLOCATOR_CALLBACK)(
ID3D12CommandAllocator* pCommandAllocator,
ID3D12CommandList* pCommandList,
UINT XMemAllocType,
SIZE_T SizeInBytes,
UINT AlignmentInBytes,
UINT Flags,
UINT64 Context);
Context
Type: UINT64
[in] A user defined value, , to be supplied when the callback is invoked.
Type: void
Employment of a user-defined callback function may be established for a command allocator, such that all memory allocations executed by the allocator are made through the given function. When a callback has been set, it is the responsibility of the user to satisfy memory allocation requests according to the given size, alignment, and XALLOC_ATTRIBUTES memory type, and return the allocations to the runtime. The user must also track these allocations and explicitly deallocate them when no longer in use (at a time no earlier than command allocator Reset).
Header: Declared in d3d12_x.h.
Library: Use d3d12_x.lib.