Class GorgonReadWriteView
An readable and writable (unordered access) view for a GorgonGraphicsResource.
Inheritance
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public abstract class GorgonReadWriteView : GorgonResourceView, IDisposable, IGorgonGraphicsObject, IEquatable<GorgonResourceView>
Remarks
This type of view allows for unordered access to a GorgonGraphicsResource like one of the GorgonBuffer types, a texture, etc... Any resource that needs a
unordered access must be created with the the UnorderedAccess
flag.
The unordered access allows a shader to read/write any part of a GorgonGraphicsResource by multiple threads without memory contention. This is done through the use of atomic functions.
These types of views are most useful for GorgonComputeShader shaders, but can also be used by a GorgonPixelShader by passing a list of these views in to a draw call.
Constructors
| Edit this page View SourceGorgonReadWriteView(GorgonGraphicsResource)
Initializes a new instance of the GorgonShaderResourceView class.
Declaration
protected GorgonReadWriteView(GorgonGraphicsResource resource)
Parameters
Type | Name | Description |
---|---|---|
GorgonGraphicsResource | resource | The resource to bind to the view. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
See Also
Methods
| Edit this page View SourceClear(int)
Function to clear the unordered access value with the specified value.
Declaration
public void Clear(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | Value used to clear. |
Remarks
This method will copy the lower n[i] bits (where n is the number of bits in a channel, i is the index of the channel) to the proper channel.
This method works on any unordered access view that does not require format conversion.
See Also
Clear(int, int, int, int)
Function to clear the unordered access value with the specified values.
Declaration
public void Clear(int value1, int value2, int value3, int value4)
Parameters
Type | Name | Description |
---|---|---|
int | value1 | First value. |
int | value2 | Second value. |
int | value3 | Third value. |
int | value4 | Fourth value. |
Remarks
This method will copy the lower n[i] bits (where n is the number of bits in a channel, i is the index of the channel) to the proper channel.
This method works on any unordered access view that does not require format conversion. Unordered access views for raw/structured buffers only use the first value.
See Also
Clear(Vector4)
Function to clear the unordered access value with the specified values.
Declaration
public void Clear(Vector4 values)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | values | Values used to clear. |
Remarks
This method will copy the lower n[i] bits (where n is the number of bits in a channel, i is the index of the channel) to the proper channel.
This method works on any unordered access view that does not require format conversion. Unordered access views for raw/structured buffers only use the first value in the vector.
See Also
Clear(float)
Function to clear the unordered access value with the specified value.
Declaration
public void Clear(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | Value used to clear. |
Remarks
This method will copy the lower n[i] bits (where n is the number of bits in a channel, i is the index of the channel) to the proper channel.
This method works on any unordered access view that does not require format conversion.
See Also
Clear(float, float, float, float)
Function to clear the unordered access value with the specified values.
Declaration
public void Clear(float value1, float value2, float value3, float value4)
Parameters
Type | Name | Description |
---|---|---|
float | value1 | First value. |
float | value2 | Second value. |
float | value3 | Third value. |
float | value4 | Fourth value. |
Remarks
This method will copy the lower n[i] bits (where n is the number of bits in a channel, i is the index of the channel) to the proper channel.
This method works on any unordered access view that does not require format conversion. Unordered access views for raw/structured buffers only use the first value.
See Also
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()