[Perf] (DirectVulkan): snapshot-gated consecutive-draw fast path skips SetupDraw re-resolution

This commit is contained in:
2026-07-30 09:40:54 -04:00
parent 6b0c2a15ab
commit 37111ae992
5 changed files with 231 additions and 0 deletions
@@ -121,6 +121,12 @@ namespace MobileGL::MG_Backend::DirectVulkan {
SharedPtr<MG_State::GLState::ITextureObject>& outTexture);
Uint8 m_gcCounter = 0;
public:
// Lock-free probe for the consecutive-draw fast path: any pending clear
// forces the full SetupDraw path (which materializes/consumes it).
Bool HasAnyPendingClears() const { return m_pendingCount.load(std::memory_order_relaxed) != 0; }
private:
mutable std::mutex m_mutex;
// Lock-free mirror of m_pendingClears.size(), maintained under m_mutex
// by every mutation. The per-draw probes (HasPendingClear/GetPending*)