Rasterfarm-SDK
Loading...
Searching...
No Matches
memorypool.h File Reference
#include "types.h"
#include "utils.h"
#include <vulkan/vulkan.h>
#include <unistd.h>

Classes

struct  Allocation
 
class  MemoryPool
 
class  MemoryAllocator
 

Typedefs

typedef Handle AllocationHandle
 
typedef OrderedMap< uint, List< AllocationHandle > > FreeSpaceMap
 

Enumerations

enum  MemoryType {
  DEVICE_ACQUIRED = 0 ,
  DEVICE_LOCAL = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT ,
  HOST_VISIBLE = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT ,
  HOST_COHERENT = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT ,
  HOST_CACHED = VK_MEMORY_PROPERTY_HOST_CACHED_BIT ,
  DEVICE_LOCAL_HOST_VISIBLE = DEVICE_LOCAL | HOST_VISIBLE ,
  DEVICE_LOCAL_HOST_COHERENT = DEVICE_LOCAL | HOST_COHERENT ,
  DEVICE_LOCAL_HOST_CACHED = DEVICE_LOCAL | HOST_CACHED ,
  HOST_VISIBLE_COHERENT = HOST_VISIBLE | HOST_COHERENT ,
  HOST_VISIBLE_CACHED = HOST_VISIBLE | HOST_CACHED ,
  HOST_COHERENT_CACHED = HOST_COHERENT | HOST_CACHED ,
  HOST_VISIBLE_COHERENT_CACHED = HOST_VISIBLE | HOST_COHERENT_CACHED ,
  DEVICE_LOCAL_HOST_VISIBLE_COHERENT = DEVICE_LOCAL | HOST_VISIBLE_COHERENT ,
  DEVICE_LOCAL_HOST_VISIBLE_CACHED = DEVICE_LOCAL | HOST_VISIBLE_CACHED ,
  DEVICE_LOCAL_HOST_VISIBLE_COHERENT_CACHED = DEVICE_LOCAL | HOST_VISIBLE_COHERENT_CACHED
}
 

Typedef Documentation

◆ AllocationHandle

typedef Handle AllocationHandle

◆ FreeSpaceMap

typedef OrderedMap< uint, List< AllocationHandle > > FreeSpaceMap

The first pair argument holds the free-space size and second a list of matching handles to allocations that are available.

Enumeration Type Documentation

◆ MemoryType

enum MemoryType
Enumerator
DEVICE_ACQUIRED 

The memory is acquired and managed by the device.

DEVICE_LOCAL 

The memory resides on the GPU.

HOST_VISIBLE 

The CPU memory is visible to the GPU.

HOST_COHERENT 

The CPU memory is synchronized with the GPU.

HOST_CACHED 

The memory is cached on the CPU.

DEVICE_LOCAL_HOST_VISIBLE 

The GPU memory is visible to the CPU and synchronized.

DEVICE_LOCAL_HOST_COHERENT 
DEVICE_LOCAL_HOST_CACHED 
HOST_VISIBLE_COHERENT 
HOST_VISIBLE_CACHED 
HOST_COHERENT_CACHED 
HOST_VISIBLE_COHERENT_CACHED 
DEVICE_LOCAL_HOST_VISIBLE_COHERENT 
DEVICE_LOCAL_HOST_VISIBLE_CACHED 
DEVICE_LOCAL_HOST_VISIBLE_COHERENT_CACHED