public static H1GpuHeap CreateGpuHeap(H1GpuMemoryPool ownerRef, H1GpuHeapType type, Int64 sizeInBytes) { H1GpuHeap newHeap = new H1GpuHeap(type, sizeInBytes); newHeap.m_Owner = ownerRef; if (!newHeap.CreateHeapPlatformDependent()) { return(null); // failed to create heap instance } // create heap allocation policy (segmented) newHeap.m_HeapResAllocPolicy = new H1GpuResAllocPolicySegmented(newHeap.m_TotalSizeInBytes, true); return(newHeap); }
protected H1GpuHeap(H1GpuHeapType type, Int64 totalSizeInBytes) { m_Type = type; m_TotalSizeInBytes = totalSizeInBytes; }