public ComputeBuffer(int count, int stride, ComputeBufferType type) { if (count <= 0) { throw new ArgumentException("Attempting to create a zero length compute buffer", "count"); } if (stride < 0) { throw new ArgumentException("Attempting to create a compute buffer with a negative stride", "stride"); } this.m_Ptr = IntPtr.Zero; ComputeBuffer.InitBuffer(this, count, stride, type); }
internal ComputeBuffer(int count, int stride, ComputeBufferType type, ComputeBufferMode usage, int stackDepth) { bool flag = count <= 0; if (flag) { throw new ArgumentException("Attempting to create a zero length compute buffer", "count"); } bool flag2 = stride <= 0; if (flag2) { throw new ArgumentException("Attempting to create a compute buffer with a negative or null stride", "stride"); } this.m_Ptr = ComputeBuffer.InitBuffer(count, stride, type, usage); this.SaveCallstack(stackDepth); }
public ComputeBuffer(int count, int stride, ComputeBufferType type) { this.m_Ptr = IntPtr.Zero; ComputeBuffer.InitBuffer(this, count, stride, type); }