![]() |
Lysa
0.0
Lysa 3D Engine
|
Device-only GPU memory array
Inheritance diagram for DeviceMemoryArray:Public Member Functions | |
| DeviceMemoryArray (const std::shared_ptr< vireo::Vireo > &vireo, size_t instanceSize, size_t instanceCount, size_t stagingInstanceCount, vireo::BufferType, const std::string &name) | |
| void | write (const MemoryBlock &destination, const void *source) override |
| void | flush (const vireo::CommandList &commandList) |
| void | postBarrier (const vireo::CommandList &commandList) const |
| ~DeviceMemoryArray () override | |
Public Member Functions inherited from MemoryArray | |
| MemoryBlock | alloc (size_t instanceCount) |
| void | free (const MemoryBlock &bloc) |
| void | copyTo (const vireo::CommandList &commandList, const MemoryArray &destination) |
| auto | getBuffer () const |
| virtual | ~MemoryArray () |
| MemoryArray (MemoryArray &) = delete | |
| MemoryArray & | operator= (MemoryArray &) = delete |
Additional Inherited Members | |
Protected Member Functions inherited from MemoryArray | |
| MemoryArray (const std::shared_ptr< vireo::Vireo > &vireo, size_t instanceSize, size_t instanceCount, vireo::BufferType bufferType, const std::string &name) | |
Protected Attributes inherited from MemoryArray | |
| const std::string | name |
| const size_t | instanceSize |
| std::shared_ptr< vireo::Buffer > | buffer |
| std::list< MemoryBlock > | freeBlocs |
| std::mutex | mutex |
| DeviceMemoryArray | ( | const std::shared_ptr< vireo::Vireo > & | vireo, |
| size_t | instanceSize, | ||
| size_t | instanceCount, | ||
| size_t | stagingInstanceCount, | ||
| vireo::BufferType | , | ||
| const std::string & | name | ||
| ) |
Creates a device only GPU memory array
| vireo | Vireo instance |
| instanceSize | Size in bytes of the resources stored in the array |
| instanceCount | Maximum number of resources stored in the array |
| stagingInstanceCount | Maximum number of temporary resources used for staging temporary data before transfer |
| name | Name of the GPU buffer for GPU-side debug |
|
override |
| void flush | ( | const vireo::CommandList & | commandList | ) |
Transfer pending writes from the staging buffer into the array
| void postBarrier | ( | const vireo::CommandList & | commandList | ) | const |
Put the GPU buffer in SHADER_READ state
|
overridevirtual |
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 |
Implements lysa::MemoryArray::write()