23typedef VkDeviceSize DeviceSize;
24typedef VkDeviceMemory DeviceMemory;
25typedef VkDeviceAddress DeviceAddress;
27#error "coregraphics/memory.h is not supported for the renderer"
106 DeviceSize deviceLocalMemory,
107 DeviceSize hostLocalMemory,
108 DeviceSize hostToDeviceMemory,
109 DeviceSize deviceToHostMemory);
Critical section objects are used to protect a portion of code from parallel execution.
Nebula's dynamic array class.
Definition array.h:60
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
void DiscardMemoryPools(VkDevice dev)
discard memory pools
Definition vkmemory.cc:95
void FreeMemory(const CoreGraphics::Alloc &alloc)
free memory
Definition vkmemory.cc:107
Util::Array< MemoryHeap > Heaps
Definition memory.cc:12
void * GetMappedMemory(const CoreGraphics::Alloc &alloc)
get mapped memory pointer
Definition vkmemory.cc:122
Util::Array< MemoryPool > Pools
Definition memory.cc:11
MemoryPoolType
Definition memory.h:31
@ MemoryPool_HostLocal
Memory which should reside solely on the GPU.
Definition memory.h:33
@ MemoryPool_DeviceLocal
Definition memory.h:32
@ NumMemoryPoolTypes
Memory which is visible on both device and host side.
Definition memory.h:37
@ MemoryPool_DeviceAndHost
Memory which is cached on host, meaning memory is flushed with a call to Flush or Invalidate.
Definition memory.h:35
@ MemoryPool_HostCached
Memory which should reside solely on the CPU and is coherent, requires no flush/invalidate.
Definition memory.h:34
void SetupMemoryPools(DeviceSize deviceLocalMemory, DeviceSize hostLocalMemory, DeviceSize hostToDeviceMemory, DeviceSize deviceToHostMemory)
setup memory pools
Definition vkmemory.cc:22
Threading::CriticalSection AllocationLock
Definition memory.cc:13
uint poolIndex
Definition memory.h:46
uint blockIndex
Definition memory.h:47
uint nodeIndex
Definition memory.h:45
DeviceSize size
Definition memory.h:44
DeviceSize offset
Definition memory.h:43
DeviceMemory mem
Definition memory.h:42
DeviceSize size
Definition memory.h:53
DeviceSize offset
Definition memory.h:52
DeviceSize space
Definition memory.h:58
uint memoryType
Definition memory.h:75
static constexpr uint DedicatedBlockNodeIndex
Definition memory.h:90
DeviceSize maxSize
Definition memory.h:83
Ids::IdPool blockPool
Definition memory.h:76
void * GetMappedMemory(const Alloc &alloc)
Definition memory.cc:111
void Clear()
Definition memory.cc:97
Alloc AllocateMemory(uint alignment, uint size)
Definition memory.cc:19
DeviceSize size
Definition memory.h:80
Util::Array< DeviceMemory > blocks
Definition memory.h:77
void DestroyBlock(DeviceMemory mem)
Definition vkmemory.cc:170
DeviceMemory CreateBlock(void **outMappedPtr)
Definition vkmemory.cc:131
bool mapMemory
Definition memory.h:84
bool DeallocateMemory(const Alloc &alloc)
Deallocates memory, if a GPU block was freed this function returns true.
Definition memory.cc:71
Util::Array< void * > blockMappedPointers
Definition memory.h:79
Util::Array< Memory::RangeAllocator > allocators
Definition memory.h:78
MemoryHeap * heap
Definition memory.h:86
const char * budgetCounter
Definition memory.h:82
Alloc AllocateExclusiveBlock(DeviceSize alignment, DeviceSize size)
Definition memory.cc:120
DeviceSize blockSize
Definition memory.h:74
unsigned int uint
Definition types.h:31