HDK
|
#include <VE_Memory.h>
Public Member Functions | |
VkDeviceMemory | getVkMem () const |
VkDeviceSize | getOffset () const |
VkDeviceSize | getSize () const |
const VmaAllocationInfo & | allocInfo () const |
UT_NON_COPYABLE (VE_Memory) | |
VE_MemType | getType () const |
void * | mapMemory () |
void | unmapMemory () |
void * | mappedPointer () |
const void * | mappedPointer () const |
bool | isCoherent () const |
bool | isDedicated () const |
VE_Memory (VE_Memory &&other) noexcept | |
VE_Memory & | operator= (VE_Memory &&other) noexcept |
VE_Result< SYS_Handle > | getExternalHandle (VkDevice device, const VE_Ext *ext) |
virtual | ~VE_Memory () |
Friends | |
class | VE_MemoryAllocator |
A block of memory as allocated by VE_MemoryAllocator. Will free itself when it goes out of scope. It represents a block of bytes, and should in general be used to as a backing member in some higher level, resource-like class, such as a Buffer or Image class.
Definition at line 118 of file VE_Memory.h.
|
inlinenoexcept |
Definition at line 142 of file VE_Memory.h.
|
virtual |
|
inline |
Definition at line 125 of file VE_Memory.h.
VE_Result<SYS_Handle> VE_Memory::getExternalHandle | ( | VkDevice | device, |
const VE_Ext * | ext | ||
) |
On linux, the returned handle is owned by the caller, and the caller is fully responsible for it. No operations are allowed on the file descriptor after a successful import into OpenCL (section 5.5.2.1 of the OpenCL spec). Likewise, performing any operation on the file descriptor after an import into OpenGL results in undefined behaviour (documented in description of the EXT_external_objects_fd extension). As a result, different callers will potentially get different handles. On windows, the returned handle is NOT owned by the caller! The caller can use the handle to import the Vulkan memory, but should not close it. See section 5.5.2.2 of the OpenCL spec and documentation for extension EXT_external_objects_win32 for more information. Every caller of this function thus shares the same handle. On mac, this function returns extension_unavailable error.
|
inline |
Definition at line 122 of file VE_Memory.h.
|
inline |
Definition at line 123 of file VE_Memory.h.
|
inline |
Definition at line 131 of file VE_Memory.h.
|
inline |
Definition at line 121 of file VE_Memory.h.
|
inline |
Definition at line 139 of file VE_Memory.h.
|
inline |
Definition at line 140 of file VE_Memory.h.
void* VE_Memory::mapMemory | ( | ) |
|
inline |
Definition at line 136 of file VE_Memory.h.
|
inline |
Definition at line 137 of file VE_Memory.h.
Definition at line 147 of file VE_Memory.h.
void VE_Memory::unmapMemory | ( | ) |
VE_Memory::UT_NON_COPYABLE | ( | VE_Memory | ) |
|
friend |
Definition at line 188 of file VE_Memory.h.
VE_MemFlags VE_Memory::flags |
Definition at line 200 of file VE_Memory.h.
void* VE_Memory::mappedPtr |
Definition at line 199 of file VE_Memory.h.
VE_MemType VE_Memory::type |
Definition at line 198 of file VE_Memory.h.