Vyroda
Game engine made by hand, with modern C++ and Vulkan.
Loading...
Searching...
No Matches
Vyroda::DeviceMemoryPool Class Referenceexport

Public Types

enum class  DeviceBufferType : std::uint8_t { UNIFORM , STAGING , VERTEX }

Public Member Functions

 DeviceMemoryPool (VkPhysicalDeviceProperties2 device_props, VkPhysicalDeviceMaintenance3Properties maintenance_props, VkPhysicalDeviceMemoryProperties memory_props)
DeviceMemoryget (VkDevice const &device, VkDeviceSize const size, std::uint32_t const memory_type, VkBufferUsageFlags const usage, VkDeviceSize const alignment, DeviceBufferType const buffer_type, bool force_new=false) __attribute__((no_thread_safety_analysis))
void clear (DeviceMemory &device_memory)
void clear ()

Member Enumeration Documentation

◆ DeviceBufferType

enum class Vyroda::DeviceMemoryPool::DeviceBufferType : std::uint8_t
strong
Enumerator
UNIFORM 
STAGING 
VERTEX 

Constructor & Destructor Documentation

◆ DeviceMemoryPool()

Vyroda::DeviceMemoryPool::DeviceMemoryPool ( VkPhysicalDeviceProperties2 device_props,
VkPhysicalDeviceMaintenance3Properties maintenance_props,
VkPhysicalDeviceMemoryProperties memory_props )

Create a device memory pool that will manage different kinds of memory

Parameters
VkPhysicalDeviceProperties2device_props
VkPhysicalDeviceMaintenance3Propertiesmaintenance_props
VkPhysicalDeviceMemoryPropertiesmemory_props

Member Function Documentation

◆ clear() [1/2]

void Vyroda::DeviceMemoryPool::clear ( )

Clear the pool

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear() [2/2]

void Vyroda::DeviceMemoryPool::clear ( DeviceMemory & device_memory)

Clear a device memory

Parameters
DeviceMemory*deviceMemory
Here is the call graph for this function:

◆ get()

DeviceMemory * Vyroda::DeviceMemoryPool::get ( VkDevice const & device,
VkDeviceSize const size,
std::uint32_t const memory_type,
VkBufferUsageFlags const usage,
VkDeviceSize const alignment,
DeviceBufferType const buffer_type,
bool force_new = false )

Request a memory device

Parameters
VkDevicedevice
VkDevicesizesize
uint32_tmemory_type
VkBufferusageflagsusage
VkDevicesizealignment
Devicebuffertypebuffer_type
boolforceNew
Returns
DeviceMemory*
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: