internal static void _ctor(ref D3D12MA_VirtualBlock pThis, D3D12MA_ALLOCATION_CALLBACKS *allocationCallbacks, [NativeTypeName("UINT64")] ulong size) { D3D12MA_IUnknownImpl._ctor(ref pThis.m_IUnknownImpl, Vtbl); pThis.m_AllocationCallbacks = *allocationCallbacks; pThis.m_Size = size; D3D12MA_BlockMetadata_Generic._ctor(ref pThis.m_Metadata, (D3D12MA_ALLOCATION_CALLBACKS *)Unsafe.AsPointer(ref pThis.m_AllocationCallbacks), true); // isVirtual pThis.m_Metadata.Init(pThis.m_Size); }
internal static void _ctor(ref D3D12MA_BlockMetadata_Generic pThis, [NativeTypeName("const D3D12MA_ALLOCATION_CALLBACKS&")] D3D12MA_ALLOCATION_CALLBACKS *allocationCallbacks, bool isVirtual) { pThis.Base = new D3D12MA_BlockMetadata(allocationCallbacks, isVirtual); pThis.Base.lpVtbl = Vtbl; pThis.m_FreeCount = 0; pThis.m_SumFreeSize = 0; D3D12MA_List <D3D12MA_Suballocation> ._ctor(ref pThis.m_Suballocations, allocationCallbacks); D3D12MA_Vector <D3D12MA_List <D3D12MA_Suballocation> .iterator> ._ctor(ref pThis.m_FreeSuballocationsBySize, allocationCallbacks); Unsafe.SkipInit(out pThis.m_ZeroInitializedRange); D3D12MA_ASSERT((D3D12MA_DEBUG_LEVEL > 0) && (allocationCallbacks != null)); }
public int Init() { HRESULT hr = Base.Init(); if (FAILED(hr)) { return(hr); } var allocationCallbacks = Base.m_Allocator->GetAllocs(); var metadata = D3D12MA_NEW <D3D12MA_BlockMetadata_Generic>(allocationCallbacks); D3D12MA_BlockMetadata_Generic._ctor(ref *metadata, allocationCallbacks, false); m_pMetadata = metadata; m_pMetadata->Init(Base.m_Size); return(hr); }
public static void Init(ref D3D12MA_BlockMetadata_Generic pThis, [NativeTypeName("UINT64")] ulong size) { D3D12MA_BlockMetadata.Init(ref pThis.Base, size); pThis.m_ZeroInitializedRange.Reset(size); pThis.m_FreeCount = 1; pThis.m_SumFreeSize = size; D3D12MA_Suballocation suballoc = default; suballoc.offset = 0; suballoc.size = size; suballoc.type = D3D12MA_SUBALLOCATION_TYPE_FREE; suballoc.userData = null; D3D12MA_ASSERT((D3D12MA_DEBUG_LEVEL > 0) && (size > MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)); pThis.m_Suballocations.push_back(in suballoc); D3D12MA_List <D3D12MA_Suballocation> .iterator suballocItem = pThis.m_Suballocations.end(); suballocItem = suballocItem.MoveBack(); pThis.m_FreeSuballocationsBySize.push_back(in suballocItem); }
public static void Dispose(ref D3D12MA_BlockMetadata_Generic pThis) { D3D12MA_BlockMetadata.Dispose(ref pThis.Base); }