Creates a generic buffer that can be passed as a parameter to a GPU program. This type of buffer can hold various type of data and can be used for various purposes. See GPUBufferType for explanation of different buffer types.
OptionalisInternalConstructor: booleanReturns number of elements in the buffer.
Returns size of a single element in the buffer in bytes.
Returns buffer usage which determines how are planning on updating the buffer contents.
Gets the size in bytes
Returns the type of the GPU buffer. type determines which kind of views (if any) can be created for the buffer, and how is data read or modified in it.
Returns buffer usage which determines how are planning on updating the buffer contents.
Reads data from a portion of the buffer and copies it to the destination buffer without blocking GPU execution. Caller must ensure destination buffer is large enough.
Offset in bytes from which to copy the data.
Length of the area you want to copy, in bytes.
Object that will be signaled when the read operation completes.
Reads stream data from a portion of the buffer and copies it to the destination buffer without blocking GPU execution. Caller must ensure destination buffer is large enough.
Offset in bytes from which to copy the data.
Length of the area you want to copy, in bytes.
Object that will be signaled when the read operation completes.
Writes data into a portion of the buffer from the source memory.
Offset in bytes from which to copy the data.
Length of the area you want to copy, in bytes.
Source buffer containing the data to write. Data is read from the start of the buffer (offset is only applied to the destination).
Write flags that may affect performance.
Writes stream data into a portion of the buffer from the source memory.
Offset in bytes from which to copy the data.
Length of the area you want to copy, in bytes.
Source buffer containing the data to write. Data is read from the start of the buffer (offset is only applied to the destination).
Write flags that may affect performance.
StaticgetReturns the size of a single element in the buffer, of the provided format, in bytes.
Handles a generic GPU buffer that you may use for storing any kind of sequential data you wish to be accessible to the GPU.
Note
Sim thread only.