Inherits Data::InstanceData.
|
| AZ_INSTANCE_DATA (Buffer, "{389B818E-136A-44A4-8B6C-4766C0DDB644}") |
|
| AZ_CLASS_ALLOCATOR (Buffer, AZ::SystemAllocator) |
|
void | WaitForUpload () |
| Blocks until a streaming upload has completed (if one is currently in flight).
|
|
RHI::Buffer * | GetRHIBuffer () |
|
const RHI::Buffer * | GetRHIBuffer () const |
|
const RHI::BufferView * | GetBufferView () const |
|
bool | UpdateData (const void *sourceData, uint64_t sourceDataSizeInBytes, uint64_t bufferByteOffset=0) |
| Update buffer's content with sourceData at an offset of bufferByteOffset.
|
|
bool | Orphan () |
|
bool | OrphanAndUpdateData (const void *sourceData, uint64_t sourceDataSizeInBytes) |
|
void * | Map (size_t byteCount, uint64_t byteOffset) |
|
void | Unmap () |
|
const RHI::AttachmentId & | GetAttachmentId () const |
| Get attachment id if this buffer is used as scope attachment.
|
|
template<class structureType > |
void | SetAsStructured () |
| Set default buffer view descriptor with specific structure.
|
|
const RHI::BufferViewDescriptor & | GetBufferViewDescriptor () const |
| Get view descriptor of this buffer.
|
|
uint64_t | GetBufferSize () const |
| Get buffer size in bytes.
|
|
void | Resize (uint64_t bufferSize) |
|
|
static Data::Instance< Buffer > | FindOrCreate (const Data::Asset< BufferAsset > &bufferAsset) |
| Instantiates or returns an existing buffer instance using its paired asset.
|
|
◆ Orphan()
bool AZ::RPI::Buffer::Orphan |
( |
| ) |
|
Reallocate a new block of memory for this buffer. The previous allocated memory will be discarded once the GPU is done using it. This only works for buffers with host heap memory level.
◆ OrphanAndUpdateData()
bool AZ::RPI::Buffer::OrphanAndUpdateData |
( |
const void * |
sourceData, |
|
|
uint64_t |
sourceDataSizeInBytes |
|
) |
| |
Orphan the buffer then update the buffer's content with input sourceData This function is only used for buffer created in host such as dynamic buffer which content is rewritten every frame
◆ Resize()
void AZ::RPI::Buffer::Resize |
( |
uint64_t |
bufferSize | ) |
|
Resize the current buffer. The data in the buffer won't be kept The buffer view descriptor and buffer view will be updated accordingly
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Buffer/Buffer.h