Luna::RHI::BufferStateFlag
enum BufferStateFlag : u32
{
none= 0x00
indirect_argument= 0x01
vertex_buffer= 0x02
index_buffer= 0x04
uniform_buffer_vs= 0x08
shader_read_vs= 0x10
uniform_buffer_ps= 0x20
shader_read_ps= 0x40
shader_write_ps= 0x80
uniform_buffer_cs= 0x0100
shader_read_cs= 0x0200
shader_write_cs= 0x0400
copy_dest= 0x0800
copy_source= 0x1000
automatic= 0x80000000
shader_read_write_ps= shader_read_ps | shader_write_ps
shader_read_write_cs= shader_read_cs | shader_write_cs
}
Specifies buffer 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 indirect argument buffer.
-
Used as a vertex buffer.
-
Used as a index buffer.
-
Used as a uniform buffer for vertex shader.
-
Used as a read-only resource for vertex shader.
-
Used as a uniform buffer for pixel 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 uniform buffer for compute shader.
-
Used as a read-only resource for compute shader.
-
Used as a write-only resource for compute shader.
-
Used as a copy destination.
-
Used as a copy source.
-
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.