private void InitializeBuffers(int count)
            {
                bufferDesc.SizeInBytes = particleCount * Particle.SizeInBytes;
                UAVBufferViewDesc.Buffer.ElementCount = particleCount;

                for (int i = 0; i < BufferProxies.Length; ++i)
                {
                    BufferProxies[i] = new UAVBufferViewProxy(Device, ref bufferDesc, ref UAVBufferViewDesc, ref SRVBufferViewDesc);
                }

                particleCountStaging.CreateBuffer(this.Device);
                particleCountGSIABuffer.CreateBuffer(this.Device);
            }
Beispiel #2
0
        public void BindUAV(DeviceContextProxy context, string name, UAVBufferViewProxy uav)
        {
            int slot = this.UnorderedAccessViewMapping.TryGetBindSlot(name);

            context.SetUnorderedAccessView(Type, slot, uav);
        }
Beispiel #3
0
 public void BindUAV(DeviceContextProxy context, int slot, UAVBufferViewProxy uav)
 {
     context.SetUnorderedAccessView(Type, slot, uav);
 }