Table of Contents

Class Buffer

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

All-in-one GPU Buffer that is able to represent many types of Buffers (shader Constant Buffers, Structured Buffers, Raw Buffers, Argument Buffers, etc.).

[DataSerializer(typeof(BufferSerializer))]
[DataSerializerGlobal(typeof(ReferenceSerializer<Buffer>), null, DataSerializerGenericMode.None, false, false, Profile = "Content")]
[ContentSerializer(typeof(DataContentSerializer<Buffer>))]
public class Buffer : GraphicsResource, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
object
Buffer
Implements
Derived
Inherited Members
Extension Methods

Remarks

Buffer constains static methods for creating new Buffers by specifying all their characteristics.

Also look for the following static methods that aid in the creation of specific kinds of Buffers: Buffer.Argument (for Argument Buffers), Buffer.Constant (for Constant Buffers), Buffer.Index (for Index Buffers), Buffer.Raw (for Raw Buffers), Buffer.Structured (for Structured Buffers), Buffer.Typed (for Typed Buffers), and Buffer.Vertex (for Vertex Buffers).

Consult the documentation of your graphics API for more information on each kind of Buffer.

Constructors

Buffer()

public Buffer()

Buffer(GraphicsDevice)

Initializes a new instance of the Buffer class.

protected Buffer(GraphicsDevice device)

Parameters

device GraphicsDevice

The GraphicsDevice the Buffer belongs to.

Buffer(GraphicsDevice, string?)

Initializes a new instance of the Buffer class.

protected Buffer(GraphicsDevice device, string? name)

Parameters

device GraphicsDevice

The GraphicsDevice the Buffer belongs to.

name string

A string to use as a name for identifying the Buffer. Useful when debugging. Specify null to use the type's name instead.

Fields

elementCount

protected int elementCount

Field Value

int

Properties

Description

Gets a description of the Buffer.

public BufferDescription Description { get; }

Property Value

BufferDescription

ElementCount

Gets the number of elements in the Buffer.

public int ElementCount { get; protected set; }

Property Value

int

Remarks

This value is valid for Structured Buffers, Raw Buffers, and Index Buffers that are used as a Shared Resource View.

Flags

Gets a combination of flags describing the type of the Buffer.

public BufferFlags Flags { get; }

Property Value

BufferFlags

InitialCounterOffset

Gets or sets the initial Append / Consume Buffer counter offset.

public int InitialCounterOffset { get; set; }

Property Value

int

A value of -1 indicates the current offset should be kept. Any other values set the hidden counter for that Appendable / Consumable Buffer. The default value is -1.

Remarks

This value is only relevant for Buffers which have the StructuredAppendBuffer or StructuredCounterBuffer flags, otherwise it is ignored.

SizeInBytes

Gets the size of the Buffer in bytes.

public int SizeInBytes { get; }

Property Value

int

StructureByteStride

Gets the size of the structure (in bytes) when the Buffer represents a typed / structured buffer.

public int StructureByteStride { get; }

Property Value

int

Usage

Gets a value that indicates how the Buffer is to be read from and written to.

public GraphicsResourceUsage Usage { get; }

Property Value

GraphicsResourceUsage

ViewFlags

Gets a combination of flags describing how a View over the Buffer should behave.

public BufferFlags ViewFlags { get; }

Property Value

BufferFlags

ViewFormat

Gets the format of the elements of the Buffer as interpreted through a View.

public PixelFormat ViewFormat { get; }

Property Value

PixelFormat

Methods

Clone()

Returns a new Buffer with exactly the same characteristics as the Buffer, but does not copy its contents.

public Buffer Clone()

Returns

Buffer

A clone of the Buffer.

GetData(CommandList, Buffer, DataPointer)

Copies the contents of the Buffer from GPU memory to a CPU memory pointer using a specific staging resource.

[Obsolete("This method is obsolete. Use the Span-based methods instead")]
public void GetData(CommandList commandList, Buffer stagingBuffer, DataPointer toData)

Parameters

commandList CommandList

The CommandList.

stagingBuffer Buffer

The staging buffer used to transfer the data from GPU memory.

toData DataPointer

To destination data pointer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

GetData<TData>(CommandList)

Gets the contents of the Buffer as an array of data.

public TData[] GetData<TData>(CommandList commandList) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

Returns

TData[]

An array of data with the contents of the Buffer.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

This method creates internally a staging resource (if this Buffer is not already a staging resource), copies to it and map it to memory. Use a method that allows to specify an explicit staging resource for optimal performance.

GetData<TData>(CommandList, Buffer, Span<TData>)

Copies the content of the Buffer from GPU memory to a CPU memory pointer using a specific staging resource.

public void GetData<TData>(CommandList commandList, Buffer stagingBuffer, Span<TData> toData) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

stagingBuffer Buffer

The staging buffer used to transfer the data from GPU memory.

toData Span<TData>

To destination span where the read data will be written.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

GetData<TData>(CommandList, Buffer, ref TData)

Copies a single data element of the Buffer from GPU memory to data on CPU memory using a specific staging resource.

public void GetData<TData>(CommandList commandList, Buffer stagingBuffer, ref TData toData) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

stagingBuffer Buffer

The staging buffer used to transfer the data from GPU memory.

toData TData

When this method returns, contains the element read from the Buffer.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

GetData<TData>(CommandList, Buffer, TData[])

Copies data from the Buffer from GPU memory into an array on CPU memory using a specific staging resource.

public void GetData<TData>(CommandList commandList, Buffer stagingBuffer, TData[] toData) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

stagingBuffer Buffer

The staging buffer used to transfer the data from GPU memory.

toData TData[]

Array where the read data should be copied.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

GetData<TData>(CommandList, ref TData)

Gets a single data element of the Buffer.

public void GetData<TData>(CommandList commandList, ref TData toData) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

toData TData

When this method returns, contains the element read from the Buffer.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

This method creates internally a staging resource (if this Buffer is not already a staging resource), copies to it and map it to memory. Use a method that allows to specify an explicit staging resource for optimal performance.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

GetData<TData>(CommandList, TData[])

Copies the contents of the Buffer to an array of data.

public void GetData<TData>(CommandList commandList, TData[] toData) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

toData TData[]

The destination array where to copy the Buffer contents.

Type Parameters

TData

The type of the data to read from the Buffer.

Remarks

This method only works when called from the main thread that is accessing the main GraphicsDevice.

This method creates internally a staging resource (if this Buffer is not already a staging resource), copies to it and map it to memory. Use a method that allows to specify an explicit staging resource for optimal performance.

Exceptions

ArgumentException

The length of the destination data buffer (toData) is larger than the size of the Buffer.

InitializeFromImpl(ref readonly BufferDescription, BufferFlags, PixelFormat, nint)

Initializes this Buffer instance with the provided options.

protected Buffer InitializeFromImpl(ref readonly BufferDescription description, BufferFlags viewFlags, PixelFormat viewFormat, nint dataPointer)

Parameters

description BufferDescription

A BufferDescription structure describing the buffer characteristics.

viewFlags BufferFlags

A combination of flags determining how the Views over this buffer should behave.

viewFormat PixelFormat

View format used if the buffer is used as a Shader Resource View, or None if not.

dataPointer nint

The data pointer to the data to initialize the buffer with.

Returns

Buffer

This same instance of Buffer already initialized.

Exceptions

ArgumentException

Element size (StructureByteStride) must be greater than zero for Structured Buffers.

New(GraphicsDevice, BufferDescription, PixelFormat)

Creates a new Buffer.

public static Buffer New(GraphicsDevice device, BufferDescription description, PixelFormat viewFormat = PixelFormat.None)

Parameters

device GraphicsDevice

The GraphicsDevice.

description BufferDescription

The description of the Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, DataPointer, int, BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

[Obsolete("This method is obsolete. Use the span-based methods instead")]
public static Buffer New(GraphicsDevice device, DataPointer dataPointer, int elementSize, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

dataPointer DataPointer

The data pointer to the initial data the Buffer will contain.

elementSize int

The size of an element in bytes.

  • For Index Buffers this must be equal to 2 (ths size of short) or 4 bytes (the size of int).
  • For Structured / Typed Buffers this must be equal to the size of the element struct.
  • For other types of Buffers, this can be set to 0.
bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, DataPointer, int, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

[Obsolete("This method is obsolete. Use the span-based methods instead")]
public static Buffer New(GraphicsDevice device, DataPointer dataPointer, int elementSize, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

dataPointer DataPointer

The data pointer to the initial data the Buffer will contain.

elementSize int

The size of an element in bytes.

  • For Index Buffers this must be equal to 2 (ths size of short) or 4 bytes (the size of int).
  • For Structured / Typed Buffers this must be equal to the size of the element struct.
  • For other types of Buffers, this can be set to 0.
bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, int, BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer New(GraphicsDevice device, int bufferSize, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

bufferSize int

Size of the Buffer in bytes.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, int, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer New(GraphicsDevice device, int bufferSize, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

bufferSize int

Size of the Buffer in bytes.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, int, int, BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer New(GraphicsDevice device, int bufferSize, int elementSize, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

bufferSize int

Size of the Buffer in bytes.

elementSize int

Size of an element in the Buffer.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, int, int, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer New(GraphicsDevice device, int bufferSize, int elementSize, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

bufferSize int

Size of the Buffer in bytes.

elementSize int

Size of an element in the Buffer.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New(GraphicsDevice, ReadOnlySpan<byte>, int, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer from a byte array.

public static Buffer New(GraphicsDevice device, ReadOnlySpan<byte> initialValues, int elementSize, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)

Parameters

device GraphicsDevice

The GraphicsDevice.

initialValues ReadOnlySpan<byte>

The initial data the Buffer will contain.

elementSize int

The size of an element in bytes.

  • For Index Buffers this must be equal to 2 (ths size of short) or 4 bytes (the size of int).
  • For Structured / Typed Buffers this must be equal to the size of the element struct.
  • For other types of Buffers, this can be set to 0.
bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer

A new instance of Buffer.

New<T>(GraphicsDevice, int, BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, int elementCount, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

elementCount int

Number of elements of type T the Buffer will contain.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of elements the Buffer will contain.

New<T>(GraphicsDevice, ReadOnlySpan<T>, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, ReadOnlySpan<T> initialValues, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

initialValues ReadOnlySpan<T>

The initial data the Buffer will contain.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of the elements the Buffer will contain.

New<T>(GraphicsDevice, ref readonly T, BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, ref readonly T value, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

value T

The initial value for the element in the Buffer.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of the element the Buffer will contain.

New<T>(GraphicsDevice, ref readonly T, BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, ref readonly T value, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

value T

The initial value for the element in the Buffer.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of the element the Buffer will contain.

New<T>(GraphicsDevice, T[], BufferFlags, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, T[] initialValue, BufferFlags bufferFlags, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

initialValue T[]

The initial data the Buffer will contain.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of the elements the Buffer will contain.

New<T>(GraphicsDevice, T[], BufferFlags, PixelFormat, GraphicsResourceUsage)

Creates a new Buffer.

public static Buffer<T> New<T>(GraphicsDevice device, T[] initialValue, BufferFlags bufferFlags, PixelFormat viewFormat = PixelFormat.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

initialValue T[]

The initial value of the Buffer.

bufferFlags BufferFlags

The buffer flags to specify the type of Buffer.

viewFormat PixelFormat

View format used if the Buffer is used as a Shader Resource View, or None if not.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

Returns

Buffer<T>

A new instance of Buffer.

Type Parameters

T

The type of the elements the Buffer will contain.

OnDestroyed(bool)

Called when the GraphicsDevice has been detected to be internally destroyed, or when the Destroy() methad has been called. Raises the Destroyed event.

protected override void OnDestroyed(bool immediately = false)

Parameters

immediately bool

A value indicating whether the resource should be destroyed immediately (true), or if it can be deferred until it's safe to do so (false).

Remarks

This method releases the underlying native resources (Silk.NET.Direct3D11.ID3D11Resource and Silk.NET.Direct3D11.ID3D11DeviceChild).

OnNameChanged()

Called when the Name property has changed.

protected override void OnNameChanged()

OnRecreate()

Called when the GraphicsDevice has been recreated.

protected override bool OnRecreate()

Returns

bool

true if resource has transitioned to the Active state.

Recreate(nint)

Recreates this buffer explicitly with the provided data. Usually called after the GraphicsDevice has been reset.

public void Recreate(nint dataPointer)

Parameters

dataPointer nint

The data pointer to the data to use to recreate the buffer with. Specify Zero if no initial data is needed.

RecreateWith(nint)

Sets the Buffer to be recreated with the specified data whenever the GraphicsDevice it depends on is reset.

public Buffer RecreateWith(nint dataPointer)

Parameters

dataPointer nint

The data pointer to the data to use to recreate the Buffer with.

Returns

Buffer

This instance.

RecreateWith<T>(T[])

Sets the Buffer to be recreated with the specified data whenever the GraphicsDevice it depends on is reset.

public Buffer RecreateWith<T>(T[] data) where T : unmanaged

Parameters

data T[]

The data to use to recreate the Buffer with.

Returns

Buffer

This instance.

Type Parameters

T

The type of the elements the Buffer will contain.

Recreate<T>(T[])

Recreates the Buffer explicitly with the provided data. Usually called after the GraphicsDevice has been reset.

public void Recreate<T>(T[] data) where T : unmanaged

Parameters

data T[]

The data to use to recreate the Buffer with.

Type Parameters

T

The type of the elements the Buffer will contain.

SetData(CommandList, DataPointer, int)

Copies data from a pointer to data on CPU memory into the Buffer in GPU memory.

[Obsolete("This method is obsolete. Use the Span-based methods instead")]
public void SetData(CommandList commandList, DataPointer fromData, int offsetInBytes = 0)

Parameters

commandList CommandList

The CommandList.

fromData DataPointer

The pointer to the data to copy from.

offsetInBytes int

The offset in bytes from the start of the Buffer where data is to be written.

Remarks

Exceptions

ArgumentException

offsetInBytes is only supported for Buffers declared with Default.

SetData<TData>(CommandList, ReadOnlySpan<TData>, int)

Copies data from a span of data on CPU memory into the Buffer in GPU memory.

public void SetData<TData>(CommandList commandList, ReadOnlySpan<TData> fromData, int offsetInBytes = 0) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

fromData ReadOnlySpan<TData>

The span of data to copy from.

offsetInBytes int

The offset in bytes from the start of the Buffer where data is to be written.

Type Parameters

TData

The type of the data to write into the Buffer.

Remarks

Exceptions

ArgumentException

The length of fromData is larger than the size of the Buffer.

ArgumentException

offsetInBytes is only supported for Buffers declared with Default.

SetData<TData>(CommandList, ref readonly TData, int)

Copies the contents an array of data on CPU memory into the Buffer in GPU memory.

public void SetData<TData>(CommandList commandList, ref readonly TData fromData, int offsetInBytes = 0) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

fromData TData

The data to copy from.

offsetInBytes int

The offset in bytes to write to.

Type Parameters

TData

The type of the data to write into the Buffer.

Remarks

Exceptions

ArgumentException

offsetInBytes is only supported for Buffers declared with Default.

SetData<TData>(CommandList, TData[], int)

Copies the contents of an array of data on CPU memory into the Buffer in GPU memory.

public void SetData<TData>(CommandList commandList, TData[] fromData, int offsetInBytes = 0) where TData : unmanaged

Parameters

commandList CommandList

The CommandList.

fromData TData[]

The array of data to copy from.

offsetInBytes int

The offset in bytes from the start of the Buffer where data is to be written.

Type Parameters

TData

The type of the data to write into the Buffer.

Remarks

Exceptions

ArgumentException

offsetInBytes is only supported for Buffers declared with Default.

ToStaging()

Returns a staging Buffer that can be read / written by the CPU that is equivalent to the Buffer.

public Buffer ToStaging()

Returns

Buffer

A new instance of the Buffer as a staging resource.

See Also