// Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #include #include namespace anki { ANKI_SVAR(GpuVisibleTransientMemory, StatCategory::kGpuMem, "GPU visible transient mem", StatFlag::kBytes | StatFlag::kMainThreadUpdates) void GpuVisibleTransientMemoryPool::endFrame() { g_svarGpuVisibleTransientMemory.set(m_pool.getAllocatedMemory()); if(m_frame == 0) { m_pool.reset(); } m_frame = (m_frame + 1) % kMaxFramesInFlight; } } // end namespace anki