docs
Loading...
Searching...
No Matches
ULGPUAllocator

#include <AppCore/CAPI/CAPI_GPUDriverAsync.h>

Overview

User-defined allocator for the memory that frames hold.

The driver copies texture and geometry data into this memory, and asks for readback memory from it. You can use this to have the driver write straight into memory your GPU reads (eg, a persistently mapped upload buffer), so your render thread doesn't need another copy.

Without an allocator, the driver uses its own CPU memory.

See also
ULGPUDriverAsyncOptions::allocator

Public Attributes

void * user_data
 Passed to every callback below (can be NULL).
ULGPUAllocatorAllocateCallback allocate
 Required. If NULL, the allocator is ignored.
ULGPUAllocatorAlignmentCallback texture_row_alignment
 The row alignment your graphics API needs to copy texture rows out of memory of a certain usage.
ULGPUAllocatorAlignmentCallback texture_offset_alignment
 The offset alignment your graphics API needs to copy a texture out of memory of a certain usage.

Member Data Documentation

◆ allocate

Required. If NULL, the allocator is ignored.

◆ texture_offset_alignment

ULGPUAllocatorAlignmentCallback texture_offset_alignment

The offset alignment your graphics API needs to copy a texture out of memory of a certain usage.

May be NULL (1).

◆ texture_row_alignment

ULGPUAllocatorAlignmentCallback texture_row_alignment

The row alignment your graphics API needs to copy texture rows out of memory of a certain usage.

May be NULL (1).

◆ user_data

void* user_data

Passed to every callback below (can be NULL).


The documentation for this struct was generated from the following file: