class GpuBuffer

robot_2Generated
code_blocksInput

Description

The GpuBuffer class in the Sandbox namespace is a GPU data buffer designed for use with a ComputeShader. It allows for reading and writing arbitrary data between the CPU and GPU, facilitating efficient parallel data processing on the GPU. Different types of GPU buffers can be utilized based on the specified UsageFlags. By default, buffers are mapped to StructuredBuffer<T> and RWStructuredBuffer<T> in HLSL.

Members

Instance Members

Member NameSummary
DisposeDestroys the GPU buffer, don't use it no more
GetDataRetrieves data from the GPU buffer into a span.
GetDataRetrieves a specified range of data from the GPU buffer into a span.
SetDataSets data in the GPU buffer from a span.
SetDataSets data in the GPU buffer from a list.
CopyStructureCountCopies the structure count from one buffer to another.
SetCounterValueSets the counter value for the buffer.
ElementCountNumber of elements in the buffer.
ElementSizeSize of a single element in the buffer.
UsageWhat sort of buffer this is.
IsValidIndicates whether the buffer is valid.