===================================================================== More...
#include <SharedBuffer.h>
Inherits AZ::Meshlets::SharedBufferInterface, and SystemTickBus::Handler.
Public Member Functions | |
AZ_RTTI (AZ::Meshlets::SharedBuffer, "{6005990E-3BBF-4946-9F2B-6A7739912100}", AZ::Meshlets::SharedBufferInterface) | |
SharedBuffer (AZStd::string bufferName, uint32_t sharedBufferSize, AZStd::vector< SrgBufferDescriptor > &buffersDescriptors) | |
void | Init (AZStd::string bufferName, AZStd::vector< SrgBufferDescriptor > &buffersDescriptors) |
AZStd::intrusive_ptr< SharedBufferAllocation > | Allocate (size_t byteCount) override |
void | DeAllocate (RHI::VirtualAddress allocation) override |
void | DeAllocateNoSignal (RHI::VirtualAddress allocation) override |
Data::Instance< RPI::Buffer > | GetBuffer () override |
Returns the buffer that is used for all skinned mesh outputs. | |
bool | UpdateData (const void *sourceData, uint64_t sourceDataSizeInBytes, uint64_t bufferByteOffset=0) override |
Update the content of an area within the shared buffer. | |
Public Member Functions inherited from AZ::Meshlets::SharedBufferInterface | |
AZ_RTTI (AZ::Meshlets::SharedBufferInterface, "{6048DAF9-7A05-41B3-94C8-FBBDB3A187D2}") | |
virtual Data::Instance< RPI::Buffer > | GetBuffer ()=0 |
Returns the buffer that is used for all skinned mesh outputs. | |
virtual AZStd::intrusive_ptr< SharedBufferAllocation > | Allocate (size_t byteCount)=0 |
virtual void | DeAllocate (RHI::VirtualAddress allocation)=0 |
virtual void | DeAllocateNoSignal (RHI::VirtualAddress allocation)=0 |
virtual bool | UpdateData (const void *sourceData, uint64_t sourceDataSizeInBytes, uint64_t bufferByteOffset=0)=0 |
Update buffer's content with sourceData at an offset of bufferByteOffset. | |
AZ_DISABLE_COPY_MOVE (SharedBufferInterface) | |
Additional Inherited Members | |
Static Public Member Functions inherited from AZ::Meshlets::SharedBufferInterface | |
static SharedBufferInterface * | Get () |
=====================================================================
===================================================================== This class represents a single RPI::Buffer used to allocate sub-buffers from the existing buffer that can then be used per draw. In a way, this buffer is used as a memory pool from which sub-buffers are being created. This is very useful when we want to synchronize the use of these buffers via barriers so we declare and pass the entire buffer between passes and therefore we are creating a dependency and barrier for this single buffer, yet as a result all sub-buffers are now getting synced between passes.
|
overridevirtual |
If the allocation succeeds, returns a ref-counted pointer to a VirtualAddress which will be automatically freed if the ref-count drops to zero If the allocation fails, returns nullptr
Implements AZ::Meshlets::SharedBufferInterface.
|
overridevirtual |
Mark the memory as available and queue garbage collection to recycle it later (see RHI::Allocator::DeAllocate) After garbage collection is done signal handlers that memory has been freed
Implements AZ::Meshlets::SharedBufferInterface.
|
overridevirtual |
Same as DeAllocate, but the signal after garbage collection is ignored If multiple allocations succeeded before one failed, use this to release the successful allocations without triggering new events indicating that new memory has been freed
Implements AZ::Meshlets::SharedBufferInterface.
|
overridevirtual |
Returns the buffer that is used for all skinned mesh outputs.
Implements AZ::Meshlets::SharedBufferInterface.
|
overridevirtual |
Update the content of an area within the shared buffer.
Implements AZ::Meshlets::SharedBufferInterface.