buffer_t class
container class for GPU data.
core::
constructors, destructors, conversion operators
member-functions
Function documentation
core:: data:: buffer_t:: buffer_t(core:: resource:: cache_t& cache,
const core:: resource:: metadata& metaData,
psl:: meta:: file* metaFile,
core:: gfx:: memory_usage usage,
core:: gfx:: memory_property memoryPropertyFlags,
memory:: region&& memory_region) noexcept
Details
will do the minimal setup needed, no allocations happen at this point yet.
| Parameters | |
|---|---|
| cache in | which cache this object has been allocated in |
| metaData in | the metadata that is assigned to this object |
| metaFile in | the metafile associated with this instance |
| usage in | the usage flags that signify how the resource should be used by the GPU |
| memoryPropertyFlags in | what are the properties of the memory (i.e. where does it live) |
| memory_region in | what is the owning region of this memory. Note that this parameter also will dictate the size and alignment of the resource. |
size_t core:: data:: buffer_t:: size() const
| Returns | the total size in the memory:: |
|---|
core:: gfx:: memory_usage core:: data:: buffer_t:: usage() const
| Returns | the core:: |
|---|
core:: gfx:: memory_property core:: data:: buffer_t:: memoryPropertyFlags() const
| Returns | the core:: |
|---|
const memory:: region& core:: data:: buffer_t:: region() const
Details
| Returns | the associated memory:: |
|---|
const std::vector<memory:: segment>& core:: data:: buffer_t:: segments() const
| Returns | all committed memory::segments in the memory:: |
|---|
std::optional<memory:: segment> core:: data:: buffer_t:: allocate(size_t size)
Details
Will try to allocate a new memory::
| Parameters | |
|---|---|
| size in | the minimum expected size, this will auto-align/grow to the alignment requirements. |
| Returns | optionally, a new allocated memory:: |
bool core:: data:: buffer_t:: deallocate(memory:: segment& segment)
Details
| Parameters | |
|---|---|
| segment in | the target segment to deallocate. |
| Returns | true in case the deallocation was successful. |