A read/write resource.
|GetDimensions||Gets the resource dimensions.|
|Load||Reads texture data.|
|Operator||Gets a resource variable.|
You can prefix RWTexture3D 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 RWTexture3D object requires an element type in a declaration statement for the object. For example, the following declaration is correct:
Because a RWTexture3D object is a UAV-type object, its properties differ from a shader resource view (SRV)-type object, such as a Texture3D object. For example, you can read from and write to a RWTexture3D object, but you can only read from a Texture3D object.
A RWTexture3D object cannot use methods from a Texture3D 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 RWTexture3D object as tex in a compute shader and then declare and use a Texture3D object as tex in a pixel shader.
The runtime enforces certain usage patterns when you create multiple view types to the same resource. For example, the runtime does not allow you to have both a UAV mapping for a resource and SRV mapping for the same resource active at the same time.
Minimum Shader Model
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: