73 DEVICE_LOCAL = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
74 HOST_VISIBLE = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
75 HOST_COHERENT = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
76 HOST_CACHED = VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
77 LAZILY_ALLOCATED = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
82 std::uint32_t typeMask,
86 VkDeviceMemory handle()
const;
88 std::uint32_t properties()
const;
89 VkDeviceSize size()
const;
91 bool isHostVisible()
const;
92 bool isHostCoherent()
const;
94 static size_t availableMemory (
111 std::uint32_t typeMask,
117 unsigned char* beginMapped()
const;
118 unsigned char* endMapped()
const;
120 VkResult map ( VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE );
123 void syncFromDevice();
126 void load (
const void* pBegin,
size_t size );
136 template<
class ResourceT,
class MemoryT >
145 const ResourceT& res,
165 template<
class ResourceT >
167 const ResourceT& res,
const MemProfile& memProfile );
179 template<
class ResourceT >
181 const ResourceT& res,
const MemProfile& memProfile );
MemProfile(ECharacteristic eChar)
The constructor - not explicit, you can use the enumeration directly.
Definition: vppDeviceMemory.hpp:66
Represents logical rendering device.
Definition: vppDevice.hpp:49
Definition: vppDeviceMemory.hpp:104
ECharacteristic
Enumeration specifying the characteristic of requested memory.
Definition: vppDeviceMemory.hpp:45
The VPP namespace.
Definition: main.hpp:1
Like HOST_STATIC, but always uncached.
Definition: vppDeviceMemory.hpp:50
Memory resides physically on GPU and is hidden from CPU (but fast).
Definition: vppDeviceMemory.hpp:47
MemoryBinding< ResourceT, DeviceMemory > bindDeviceMemory(const ResourceT &res, const MemProfile &memProfile)
Binds specified buffer to a DeviceMemory memory, and returns MemoryBinding object.
const ResourceT & resource() const
Retrieves the buffer.
A compound object containing references to a buffer and memory bound to it.
Definition: vppDeviceMemory.hpp:137
Memory resides physically on CPU side and is accessible to GPU, likely slower than GPU-local memory...
Definition: vppDeviceMemory.hpp:48
In this context, same as DEVICE_STATIC.
Definition: vppDeviceMemory.hpp:51
Memory resides physically on GPU and is visible to CPU. If that scenario is not supported by the hard...
Definition: vppDeviceMemory.hpp:49
MemoryBinding< ResourceT, MappableDeviceMemory > bindMappableMemory(const ResourceT &res, const MemProfile &memProfile)
Binds specified buffer to a MappableDeviceMemory memory, and returns MemoryBinding object...
MemoryT & memory()
Retrieves the memory object.
Abstraction of GPU-interoperable memory types.
Definition: vppDeviceMemory.hpp:39
MemoryBinding()
Constructs null reference.