Luna::RHI::TextureStateFlag
enum TextureStateFlag : u32
{
none= 0x00
shader_read_vs= 0x01
shader_read_ps= 0x02
shader_write_ps= 0x04
color_attachment_read= 0x08
color_attachment_write= 0x10
depth_stencil_attachment_read= 0x20
depth_stencil_attachment_write= 0x40
resolve_attachment= 0x80
shader_read_cs= 0x0100
shader_write_cs= 0x0200
copy_dest= 0x0400
copy_source= 0x0800
present= 0x1000
automatic= 0x80000000
shader_read_write_ps= shader_read_ps | shader_write_ps
shader_read_write_cs= shader_read_cs | shader_write_cs
}
Specifies texture resource states before and after one barrier.
Options
-
This resource is not used by the pipeline. Resources with no state flag cannot be used by the pipeline, and must be transfered to one valid state before it can be used.
-
Used as a sampled texture for vertex shader.
-
Used as a read-only resource for pixel shader.
-
Used as a write-only resource for pixel shader. Enabled only if pixel shader write feature is supported.
-
Used as a color attachment with read access.
-
Used as a color attachment with write access.
-
Used as a depth stencil attachment with read access.
-
depth_stencil_attachment_write
Used as a depth stencil attachment with write access.
-
Used as a resolve attachment with write access.
-
Used as a shader resource for compute shader.
-
Used as a read-only unordered access for compute shader.
-
Used as a copy destination.
-
Used as a copy source.
-
Used for swap chain presentation.
-
If this is specified as the before state, the system determines the before state automatically using the last state specified in the same command buffer for the resource. If this is the first time the resource is used in the current command buffer, the system loads the resource's global state automatically.
-
Used as a read-write resource for pixel shader. This is a combination of shader_read_ps and shader_write_ps.
-
Used as a read-write resource for compute shader. This is a combination of shader_read_cs and shader_write_cs.