Asynchronous GPU upload manager. More...
#include <GPUUploadManager.h>
Public Member Functions | |
| virtual void DILIGENT_CALL_TYPE | RenderThreadUpdate (IDeviceContext *pContext)=0 |
| virtual void DILIGENT_CALL_TYPE | ScheduleBufferUpdate (const ScheduleBufferUpdateInfo &UpdateInfo)=0 |
| virtual void DILIGENT_CALL_TYPE | GetStats (GPUUploadManagerStats &Stats) const =0 |
Public Member Functions inherited from Diligent.IObject | |
| virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
| Queries the specific interface. | |
| template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type> | |
| void | QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface) |
| virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
| Increments the number of strong references by 1. | |
| virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
| virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Asynchronous GPU upload manager.
|
pure virtual |
Retrieves GPU upload manager statistics.
The method must not be called concurrently with RenderThreadUpdate().
|
pure virtual |
Executes pending render-thread operations.
The method can be called in parallel with ScheduleBufferUpdate() from worker threads, but only one thread is allowed to call RenderThreadUpdate() at a time. The method must be called periodically to process pending buffer updates. If the method is not called, ScheduleBufferUpdate() may block indefinitely when there are no free pages available for new updates.
|
pure virtual |
Schedules an asynchronous buffer update operation.
| [in] | UpdateInfo | - Structure describing the buffer update operation. See ScheduleBufferUpdateInfo for details. |
The method is thread-safe and can be called from multiple threads simultaneously with other calls to ScheduleBufferUpdate() and RenderThreadUpdate().
If the method is called from a worker thread, the pContext parameter must be null, and the render thread must periodically call RenderThreadUpdate() to process pending buffer updates. If RenderThreadUpdate() is not called, the method may block indefinitely when there are no free pages available for new updates.
If the method is called from the render thread, the pContext parameter must be a pointer to the device context used to create the GPU upload manager. If the method is called from the render thread with null pContext, it may never return.