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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 public void AddBuffer(string bufferName, MyComputeBufferId bufferId, List <MyKernelHandle> handles)
 {
     _bufferUsages.Add(new MyComputeBufferUsageTemplate(bufferName, bufferId, handles));
 }
Exemplo n.º 7
0
 public bool IsRequestedBufferId(MyComputeBufferId id)
 {
     return(_requestedBufferIds.Contains(id));
 }
Exemplo n.º 8
0
 public void AddBuffer(MyComputeBufferId id, ComputeBuffer buffer)
 {
     Preconditions.Assert(_requestedBufferIds.Contains(id), "Passed id if not requested");
     _createdBuffers.Add(id, buffer);
 }