3#include <QtCore/QElapsedTimer>
4#include <QtCore/qglobal.h>
8#if defined(QGC_HAS_ANY_GPU_PATH)
9#include <private/qhwvideobuffer_p.h>
53#if defined(QGC_HAS_ANY_GPU_PATH)
HwVideoBufferPath
Identifies which GPU path was chosen; used by the adapter to increment the right counter.
RAII timer: records mapTextures() wall time into the path's EWMA on scope exit.
ScopedMapTimer(HwVideoBufferPath path) noexcept
ScopedMapTimer & operator=(const ScopedMapTimer &)=delete
~ScopedMapTimer() noexcept
ScopedMapTimer(const ScopedMapTimer &)=delete
void recordSyncWait(HwVideoBufferPath path, bool gpuSide) noexcept
GL fence sync wait; split CPU-blocking vs GPU-side.
quint64 peekMapFailureCount(HwVideoBufferPath path) noexcept
quint64 takeExplicitFenceWaits(HwVideoBufferPath path) noexcept
quint64 peekFenceTimeouts(HwVideoBufferPath path) noexcept
void recordFallbackReason(HwVideoBufferPath attemptedPath, HwFallbackReason reason) noexcept
Per-(path,reason) fallback accounting; lets a bug report show why a path demoted to CPU.
quint64 takeTextureReuseHits(HwVideoBufferPath path) noexcept
void recordMapDuration(HwVideoBufferPath path, qint64 nsecs) noexcept
Per-path mapTextures() wall-time, fed into an EWMA; peek returns the smoothed value in microseconds.
quint64 peekFallbackReason(HwVideoBufferPath attemptedPath, HwFallbackReason reason) noexcept
quint64 takeImageCacheHits(HwVideoBufferPath path) noexcept
quint64 peekMmapBarrierHits(HwVideoBufferPath path) noexcept
void recordImageCacheHit(HwVideoBufferPath path) noexcept
Native image/texture cache hit/miss accounting.
quint64 takeSyncWaitCounts(HwVideoBufferPath path, quint64 &gpuWaits) noexcept
Reads-and-resets CPU waits; writes GPU waits into gpuWaits.
quint64 peekMapDurationUsEwma(HwVideoBufferPath path) noexcept
quint64 takeFenceTimeouts(HwVideoBufferPath path) noexcept
void recordStreamDemotion(HwVideoBufferPath negotiated) noexcept
One-shot-per-epoch event: a stream that negotiated a HW path demoted to CPU. Distinct from per-frame ...
void recordImageCacheMiss(HwVideoBufferPath path) noexcept
void recordExplicitFenceWait(HwVideoBufferPath path) noexcept
DMABuf imported the producer's dma-buf/native fence and did a GPU-side wait (skipped the mmap barrier...
quint64 takeStreamDemotions(HwVideoBufferPath negotiated) noexcept
void recordFenceTimeout(HwVideoBufferPath path) noexcept
DMABuf EGL fence wait timed out (GPU stall) and fell through to the mmap barrier.
quint64 peekDeliveredCount(HwVideoBufferPath path) noexcept
quint64 takeMapFailureCount(HwVideoBufferPath path) noexcept
void recordDelivered(HwVideoBufferPath path) noexcept
Frames successfully delivered via this path.
quint64 takeImageCacheMisses(HwVideoBufferPath path) noexcept
void recordTextureReuse(HwVideoBufferPath path) noexcept
Prior frame's QRhiTexture wrappers reused (decoder pool returned same native handle).
void recordMmapBarrierHit(HwVideoBufferPath path) noexcept
DMABuf mmap CPU-side completion barrier taken (no usable fence ext).
void recordMapFailure(HwVideoBufferPath path) noexcept
mapTextures() returned an invalid bundle (GPU import failed).
quint64 takeDeliveredCount(HwVideoBufferPath path) noexcept
quint64 takeFallbackReason(HwVideoBufferPath attemptedPath, HwFallbackReason reason) noexcept
HwFallbackReason
Specific cause a HW path was rejected for a sample; surfaced as a per-(path,reason) breakdown.
quint64 takeMmapBarrierHits(HwVideoBufferPath path) noexcept