Ejemplo n.º 1
0
        public void AddStats([NativeTypeName("StatInfo&")] D3D12MA_StatInfo *outStats)
        {
            using var @lock = new D3D12MA_MutexLockRead(ref m_Mutex, m_hAllocator->UseMutex());

            for (nuint i = 0; i < m_Blocks.size(); ++i)
            {
                D3D12MA_NormalBlock *pBlock = m_Blocks[i]->Value;

                D3D12MA_ASSERT((D3D12MA_DEBUG_LEVEL > 0) && (pBlock != null));
                D3D12MA_HEAVY_ASSERT((D3D12MA_DEBUG_LEVEL > 1) && pBlock->Validate());

                D3D12MA_StatInfo blockStatInfo;
                pBlock->m_pMetadata->CalcAllocationStatInfo(&blockStatInfo);

                AddStatInfo(ref *outStats, ref blockStatInfo);
            }
        }
Ejemplo n.º 2
0
        public bool IsEmpty()
        {
            using var @lock = new D3D12MA_MutexLockRead(ref m_Mutex, m_hAllocator->UseMutex());

            return(m_Blocks.empty());
        }