| 12345678910111213141516171819202122232425 |
- // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- #include <AnKi/GpuMemory/GpuVisibleTransientMemoryPool.h>
- #include <AnKi/Core/StatsSet.h>
- 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
|