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

  • none

    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.

  • indirect_argument

    Used as a indirect argument buffer.

  • vertex_buffer

    Used as a vertex buffer.

  • index_buffer

    Used as a index buffer.

  • uniform_buffer_vs

    Used as a uniform buffer for vertex shader.

  • shader_read_vs

    Used as a read-only resource for vertex shader.

  • uniform_buffer_ps

    Used as a uniform buffer for pixel shader.

  • shader_read_ps

    Used as a read-only resource for pixel shader.

  • shader_write_ps

    Used as a write-only resource for pixel shader. Enabled only if pixel shader write feature is supported.

  • uniform_buffer_cs

    Used as a uniform buffer for compute shader.

  • shader_read_cs

    Used as a read-only resource for compute shader.

  • shader_write_cs

    Used as a write-only resource for compute shader.

  • copy_dest

    Used as a copy destination.

  • copy_source

    Used as a copy source.

  • automatic

    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.

  • shader_read_write_ps

    Used as a read-write resource for pixel shader. This is a combination of shader_read_ps and shader_write_ps.

  • shader_read_write_cs

    Used as a read-write resource for compute shader. This is a combination of shader_read_cs and shader_write_cs.