![]() |
Vireo
0.0
Vireo 3D Rendering Hardware Interface
|
A buffer object. Buffers represent linear arrays of data which are used for various purposes by binding them to a graphics or compute pipeline via descriptor sets or certain commands, or by directly specifying them as parameters to certain commands.
Manual page : Memory buffers
Public Member Functions | |
auto | getSize () const |
auto | getType () const |
auto | getInstanceSize () const |
auto | getInstanceSizeAligned () const |
auto | getInstanceCount () const |
auto | getMappedAddress () const |
virtual void | map () = 0 |
virtual void | unmap () = 0 |
void | write (const void *data, size_t size=WHOLE_SIZE, size_t offset=0) const |
virtual | ~Buffer () = default |
Buffer (const Buffer &) = delete | |
Buffer & | operator= (const Buffer &) = delete |
Static Public Member Functions | |
static auto | getMemoryAllocations () |
Static Public Attributes | |
static constexpr size_t | WHOLE_SIZE = ~0ULL |
Protected Member Functions | |
Buffer (const BufferType type) | |
Protected Attributes | |
size_t | bufferSize {0} |
uint32_t | instanceSize {0} |
uint32_t | instanceCount {0} |
uint32_t | instanceSizeAligned {0} |
void * | mappedAddress {nullptr} |
Static Protected Attributes | |
static std::mutex | memoryAllocationsMutex |
static std::list< VideoMemoryAllocationDesc > | memoryAllocations |
|
virtualdefault |
|
delete |
|
inlineprotected |
|
inline |
Returns the number of data instances
|
inline |
Returns the size of a data instance, in bytes
|
inline |
Returns the aligned size of a data instance, in bytes
|
inline |
Returns a host virtual memory address. Valid only after a map()
call.
|
inlinestatic |
Returns the currently allocated buffers. Only available if isMemoryUsageEnabled() is true
|
inline |
Returns the total buffer size in bytes
|
inline |
Returns the type of the buffer
|
pure virtual |
Maps the device memory associated with the buffer into a host adress sapce
|
delete |
|
pure virtual |
Unmap a previously mapped buffer
void write | ( | const void * | data, |
size_t | size = WHOLE_SIZE , |
||
size_t | offset = 0 |
||
) | const |
Writes data into the host mapped memory associated. Buffer must be mapped before.
data | Source data address in the host address space |
size | Size of the data in bytes |
offset | Destination offset in bytes |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticconstexpr |