Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IGPUUploadManager Struct Referenceabstract

Asynchronous GPU upload manager. More...

#include <GPUUploadManager.h>

Inheritance diagram for Diligent::IGPUUploadManager:
Diligent.IObject

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
 

Detailed Description

Asynchronous GPU upload manager.

Member Function Documentation

◆ GetStats()

virtual void DILIGENT_CALL_TYPE Diligent::IGPUUploadManager::GetStats ( GPUUploadManagerStats & Stats) const
pure virtual

Retrieves GPU upload manager statistics.

The method must not be called concurrently with RenderThreadUpdate().

◆ RenderThreadUpdate()

virtual void DILIGENT_CALL_TYPE Diligent::IGPUUploadManager::RenderThreadUpdate ( IDeviceContext * pContext)
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.

◆ ScheduleBufferUpdate()

virtual void DILIGENT_CALL_TYPE Diligent::IGPUUploadManager::ScheduleBufferUpdate ( const ScheduleBufferUpdateInfo & UpdateInfo)
pure virtual

Schedules an asynchronous buffer update operation.

Parameters
[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.