![]() |
Lysa
0.0
Lysa 3D Engine
|
Base class for all GPU memory arrays
Inheritance diagram for MemoryArray:Public Member Functions | |
| MemoryBlock | alloc (size_t instanceCount) |
| void | free (const MemoryBlock &bloc) |
| virtual void | write (const MemoryBlock &destination, const void *source) = 0 |
| void | copyTo (const vireo::CommandList &commandList, const MemoryArray &destination) |
| auto | getBuffer () const |
| virtual | ~MemoryArray () |
| MemoryArray (MemoryArray &) = delete | |
| MemoryArray & | operator= (MemoryArray &) = delete |
Protected Member Functions | |
| MemoryArray (const std::shared_ptr< vireo::Vireo > &vireo, size_t instanceSize, size_t instanceCount, vireo::BufferType bufferType, const std::string &name) | |
Protected Attributes | |
| const std::string | name |
| const size_t | instanceSize |
| std::shared_ptr< vireo::Buffer > | buffer |
| std::list< MemoryBlock > | freeBlocs |
| std::mutex | mutex |
|
virtual |
|
delete |
|
protected |
| MemoryBlock alloc | ( | size_t | instanceCount | ) |
Allocate a new GPU memory block
| instanceCount | Number of resources instances stored in this memory block |
| void copyTo | ( | const vireo::CommandList & | commandList, |
| const MemoryArray & | destination | ||
| ) |
Copy the entire content of this memory array to another GPU memory array
| commandList | Command list used for the copy operation |
| destination | Destination GPU memory array |
| void free | ( | const MemoryBlock & | bloc | ) |
Free a previously allocated GPU memory block
| bloc | Allocated memory block |
|
inline |
Returns the GPU memory buffer allocated for the entire array
|
delete |
|
pure virtual |
Schedule a data transfert from the CPU to the GPU. Data will be temporarily written into a staging buffer.
| destination | Destination memory block |
| source | Source address of CPU memory |
Implemented in lysa::HostVisibleMemoryArray::write(), lysa::DeviceMemoryArray::write()
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |