XLE
v0.02.0
|
Public Member Functions | |
void | UpdateData (TransactionID id, DataPacket *rawData, const PartialResource &) |
Use UpdateData to change the data within an existing object More... | |
TransactionID | Transaction_Begin (const BufferDesc &desc, DataPacket *initialisationData=NULL, TransactionOptions::BitField flags=0) |
Begin a new transaction More... | |
TransactionID | Transaction_Begin (intrusive_ptr< ResourceLocator > &locator, TransactionOptions::BitField flags=0) |
Begin a new transaction More... | |
void | Transaction_End (TransactionID id) |
Ends a transaction More... | |
void | Transaction_Validate (TransactionID id) |
Validates a transaction More... | |
intrusive_ptr< ResourceLocator > | Transaction_Immediate (const BufferDesc &desc, DataPacket *initialisationData, const PartialResource &) |
Create a new buffer synchronously More... | |
intrusive_ptr< ResourceLocator > | GetResource (TransactionID id) |
Gets the resource from a completed transaction More... | |
void | Resource_Validate (const ResourceLocator &locator) |
Read back data from a resource More... | |
intrusive_ptr< DataPacket > | Resource_ReadBack (const ResourceLocator &locator) |
Read back data from a resource More... | |
void | AddRef (TransactionID id) |
Add extra ref count to transaction More... | |
bool | IsCompleted (TransactionID id) |
Checks for completion More... | |
CommandListMetrics | PopMetrics () |
Gets performance metrics More... | |
PoolSystemMetrics | CalculatePoolMetrics () const |
Returns metrics about pool memory More... | |
size_t | ByteCount (const BufferDesc &desc) const |
Returns the size of a buffer More... | |
void | Update (RenderCore::IThreadContext &) |
Called every frame to update uploads More... | |
void | Flush () |
Stalls until all work queues are empty More... | |
void | FramePriority_Barrier () |
Sets a barrier for frame priority operations More... | |
EventListID | EventList_GetLatestID () |
void | EventList_Get (EventListID id, Event_ResourceReposition *&begin, Event_ResourceReposition *&end) |
void | EventList_Release (EventListID id) |
void | OnLostDevice () |
void | OnResetDevice () |
Manager (RenderCore::IDevice *renderDevice) | |
Public Member Functions inherited from BufferUploads::IManager |
Additional Inherited Members | |
Public Types inherited from BufferUploads::IManager | |
typedef uint32 | EventListID |
|
virtual |
Add extra ref count to transaction
Adds another reference count to a transaction. Useful when a resource is getting cloned. Should be balanced with a call to Transaction_End
Implements BufferUploads::IManager.
|
virtual |
Returns the size of a buffer
Calculates the size of a buffer from a description. This can be used to estimate the amount of GPU memory that will be used.
Implements BufferUploads::IManager.
|
virtual |
Returns metrics about pool memory
Returns some profiling metrics related to the resource pooling buffers maintained by the system. Used by the BufferUploadDisplay for presenting profiling information.
Implements BufferUploads::IManager.
|
virtual |
Stalls until all work queues are empty
Normally should only be used during shutdown and loading.
Implements BufferUploads::IManager.
|
virtual |
Sets a barrier for frame priority operations
Sets a barrier, which determines the "end of frame" point for frame priority operations. This will normally be called from the same thread that begins most upload operations.
Implements BufferUploads::IManager.
|
virtual |
Gets the resource from a completed transaction
After a transaction has been completed, get the resource with this method. Note that the reference count for the returned resource is incremented by one in this method. The caller must balance that with a call to Resource_Release().
Implements BufferUploads::IManager.
|
virtual |
Checks for completion
Returns true iff the given transaction has been completed.
Implements BufferUploads::IManager.
|
virtual |
Gets performance metrics
Gets the latest performance metrics. Internally the system maintains a queue of performance metrics. Every frame, a new set of metrics is pushed onto the queue (until the stack reaches it's maximum size). PopMetrics() will remove the next item from the queue. If there no more items, "_commitTime" will be 0.
Implements BufferUploads::IManager.
|
virtual |
Read back data from a resource
Read data back from a resource. Sometimes this may require copying data from the GPU onto the CPU. Note that this can have a significant effect on performance! If the resource is currently in use by the GPU, it can result in a store. Whenever possible, it's recommended to avoid using this method. It's provided for compatibility and debugging.
Implements BufferUploads::IManager.
|
virtual |
Read back data from a resource
Read data back from a resource. Sometimes this may require copying data from the GPU onto the CPU. Note that this can have a significant effect on performance! If the resource is currently in use by the GPU, it can result in a store. Whenever possible, it's recommended to avoid using this method. It's provided for compatibility and debugging.
Implements BufferUploads::IManager.
|
virtual |
Begin a new transaction
Begin a new transaction, either by creating a new resource, or by attaching to an existing resource.
Implements BufferUploads::IManager.
|
virtual |
Begin a new transaction
Begin a new transaction, either by creating a new resource, or by attaching to an existing resource.
Implements BufferUploads::IManager.
|
virtual |
Ends a transaction
Ends a transaction started with Transaction_Begin. Internally, this updates a reference count. So every call to Transaction_Begin must be balanced with a call to Transaction_End. Be sure to end all transactions before destroying the buffer uploads manager.
Implements BufferUploads::IManager.
|
virtual |
Create a new buffer synchronously
Creates a new resource synchronously. All creating objects will execute in the current thread, and a new resource will be returned from the call. Use these methods when uploads can't be delayed.
Implements BufferUploads::IManager.
|
virtual |
Validates a transaction
This is a tool for debugging. Checks a transaction for common problems. Only implemented in _DEBUG builds. Errors will invoke an assert.
Implements BufferUploads::IManager.
|
virtual |
Called every frame to update uploads
Performs once-per-frame tasks. Normally called by the render device once per frame.
Implements BufferUploads::IManager.
|
virtual |
Use UpdateData to change the data within an existing object
Upload data for buffer uploads can be provided either to the Transaction_Begin call, or to UploadData. Use UploadData when you want to update an existing resource, or change the data that's already present.
Implements BufferUploads::IManager.