public DataSet(Utility.GPUBufferType bufferType, uint totalCount, uint maxQueuedFrameCount, uint updateRangePoolSize, bool mockBuffer) { bool flag = !mockBuffer; if (flag) { this.gpuData = new Utility.GPUBuffer <T>((int)totalCount, bufferType); } this.cpuData = new NativeArray <T>((int)totalCount, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); this.allocator = new GPUBufferAllocator(totalCount); bool flag2 = !mockBuffer; if (flag2) { this.m_ElemStride = (uint)this.gpuData.ElementStride; } this.m_UpdateRangePoolSize = updateRangePoolSize; uint length = this.m_UpdateRangePoolSize * maxQueuedFrameCount; this.updateRanges = new NativeArray <GfxUpdateBufferRange>((int)length, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); this.m_UpdateRangeMin = 4294967295u; this.m_UpdateRangeMax = 0u; this.m_UpdateRangesEnqueued = 0u; this.m_UpdateRangesBatchStart = 0u; }
public DataSet(Utility.GPUBufferType bufferType, uint totalCount, uint maxQueuedFrameCount, uint updateRangePoolSize, bool mockBuffer) { if (!mockBuffer) { gpuData = new Utility.GPUBuffer <T>((int)totalCount, bufferType); } cpuData = new NativeArray <T>((int)totalCount, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); allocator = new GPUBufferAllocator(totalCount); if (!mockBuffer) { m_ElemStride = (uint)gpuData.ElementStride; } m_UpdateRangePoolSize = updateRangePoolSize; uint multipliedUpdateRangePoolSize = m_UpdateRangePoolSize * maxQueuedFrameCount; updateRanges = new NativeArray <GfxUpdateBufferRange>((int)multipliedUpdateRangePoolSize, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); m_UpdateRangeMin = uint.MaxValue; m_UpdateRangeMax = 0; m_UpdateRangesEnqueued = 0; m_UpdateRangesBatchStart = 0; }