Nebula
Loading...
Searching...
No Matches
vkmemory.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "util/array.h"
11#include "coregraphics/memory.h"
12
13namespace Vulkan
14{
15
17CoreGraphics::Alloc AllocateMemory(const VkDevice dev, const VkImage& img, CoreGraphics::MemoryPoolType type);
19CoreGraphics::Alloc AllocateMemory(const VkDevice dev, const VkBuffer& buf, CoreGraphics::MemoryPoolType type, uint alignment = 1);
21CoreGraphics::Alloc AllocateMemory(const VkDevice dev, VkMemoryRequirements reqs, VkDeviceSize allocSize);
22
24void Flush(const VkDevice dev, const CoreGraphics::Alloc& alloc, IndexT offset, SizeT size);
26void Invalidate(const VkDevice dev, const CoreGraphics::Alloc& alloc, IndexT offset, SizeT size);
27
29VkResult GetMemoryType(uint32_t bits, VkMemoryPropertyFlags flags, uint32_t& index);
30
31} // namespace Vulkan
MemoryPoolType
Definition memory.h:31
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
VkResult GetMemoryType(uint32_t bits, VkMemoryPropertyFlags flags, uint32_t &index)
get vulkan memory type based on resource requirements and wanted memory properties
Definition vkmemory.cc:342
void Flush(const VkDevice dev, const Alloc &alloc, IndexT offset, SizeT size)
flush a mapped memory region
Definition vkmemory.cc:302
CoreGraphics::Alloc AllocateMemory(const VkDevice dev, const VkImage &img, MemoryPoolType type)
allocate memory for an image
Definition vkmemory.cc:193
void Invalidate(const VkDevice dev, const CoreGraphics::Alloc &alloc, IndexT offset, SizeT size)
invalidate a mapped memory region
Definition vkmemory.cc:322
Graphics memory interface.
Definition memory.h:41
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48