A read/write resource.
|GetDimensions||Gets the resource dimensions.|
|Load||Reads texture data.|
|Operator||Gets a resource variable.|
You can prefix RWTexture2DArray objects with the storage class globallycoherent. This storage class causes memory barriers and syncs to flush data across the entire GPU such that other groups can see writes. Without this specifier, a memory barrier or sync will flush a UAV only within the current group.
A RWTexture2DArray object requires an element type in a declaration statement for the object. For example, the following declaration is correct:
Because a RWTexture2DArray object is a UAV-type object, its properties differ from a shader resource view (SRV)-type object, such as a Texture2DArray object. For example, you can read from and write to a RWTexture2DArray object, but you can only read from a Texture2DArray object.
A RWTexture2DArray object cannot use methods from a Texture2DArray object, such as Sample. However, because you can create multiple view types to the same resource, you can declare multiple texture types as a single texture in multiple shaders. For example, you can declare and use a RWTexture2DArray object as tex in a compute shader and then declare and use a Texture2DArray object as tex in a pixel shader.
This object is supported in the following shader models.
|Shader Model 5 and higher shader models||yes|
This object is supported for the following types of shaders: