|
KiCad PCB EDA Suite
|
Holds destroyed GPU resource handles until no in-flight command buffer can still reference them. More...
#include <rhi_deferred_release.h>
Public Member Functions | |
| void | Enqueue (RHI_DEFERRED_RESOURCE_TYPE aType, uint32_t aHandleValue, uint64_t aCurrentFrame) |
| template<typename Func> | |
| void | ProcessRetired (uint64_t aCompletedFrame, Func &&aFreeFunc) |
| bool | HasRetired (uint64_t aCompletedFrame) const |
| size_t | PendingCount () const |
| template<typename Func> | |
| void | FlushAll (Func &&aFreeFunc) |
Private Attributes | |
| std::mutex | m_mutex |
| std::vector< RHI_DEFERRED_RELEASE_ENTRY > | m_entries |
Holds destroyed GPU resource handles until no in-flight command buffer can still reference them.
The UI thread enqueues while the render thread frees. The free callback runs outside the lock so slow GPU destruction does not block producers and a callback that re-enters the queue cannot deadlock.
Definition at line 56 of file rhi_deferred_release.h.
|
inline |
Definition at line 59 of file rhi_deferred_release.h.
References m_entries, m_mutex, and RHI_FRAMES_IN_FLIGHT.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 107 of file rhi_deferred_release.h.
References m_entries, and m_mutex.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 89 of file rhi_deferred_release.h.
References m_entries, m_mutex, and RHI_DEFERRED_RELEASE_ENTRY::retireFrame.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 100 of file rhi_deferred_release.h.
|
inline |
Definition at line 67 of file rhi_deferred_release.h.
|
private |
Definition at line 122 of file rhi_deferred_release.h.
Referenced by Enqueue(), FlushAll(), HasRetired(), PendingCount(), and ProcessRetired().
|
mutableprivate |
Definition at line 121 of file rhi_deferred_release.h.
Referenced by Enqueue(), FlushAll(), HasRetired(), PendingCount(), and ProcessRetired().