public MyComputeBufferId AddComputeBufferTemplate(MyComputeBufferTemplate template)
        {
            var bufferId = new MyComputeBufferId()
            {
                Id = _lastBufferId++
            };

            _computeBufferTemplates[bufferId] = template;
            return(bufferId);
        }
        public MyComputeBufferId AddExistingComputeBuffer(ComputeBuffer buffer)
        {
            var bufferId = new MyComputeBufferId()
            {
                Id = _lastBufferId++
            };

            _arleadyCreatedComputeBufferTemplates[bufferId] = buffer;
            return(bufferId);
        }
示例#3
0
 public void SetBuffer(string bufferName, MyComputeBufferId bufferId, List <MyKernelHandle> kernelHandles)
 {
     _parametersUsageContainer.AddBuffer(bufferName, bufferId, kernelHandles);
 }
 public ComputeBuffer RetriveBuffer(MyComputeBufferId id)
 {
     Preconditions.Assert(_buffers.ContainsKey(id), " There is no buffer of given id ");
     return(_buffers[id]);
 }
 public void AddBuffer(MyComputeBufferId id, ComputeBuffer buffer)
 {
     _buffers[id] = buffer;
 }
示例#6
0
 public void AddBuffer(string bufferName, MyComputeBufferId bufferId, List <MyKernelHandle> handles)
 {
     _bufferUsages.Add(new MyComputeBufferUsageTemplate(bufferName, bufferId, handles));
 }
示例#7
0
 public bool IsRequestedBufferId(MyComputeBufferId id)
 {
     return(_requestedBufferIds.Contains(id));
 }
示例#8
0
 public void AddBuffer(MyComputeBufferId id, ComputeBuffer buffer)
 {
     Preconditions.Assert(_requestedBufferIds.Contains(id), "Passed id if not requested");
     _createdBuffers.Add(id, buffer);
 }