ERHIAccess

Choose your operating system:

Windows

macOS

Linux

References

Module

RHI

Header

/Engine/Source/Runtime/RHI/Public/RHI.h

Include

#include "RHI.h"

Syntax

enum ERHIAccess
{
    Unknown                   = 0,
    CPURead                   = 1 << 0,
    Present                   = 1 << 1,
    IndirectArgs              = 1 << 2,
    VertexOrIndexBuffer       = 1 << 3,
    SRVCompute                = 1 << 4,
    SRVGraphics               = 1 << 5,
    CopySrc                   = 1 << 6,
    ResolveSrc                = 1 << 7,
    DSVRead                   = 1 << 8,
    UAVCompute                = 1 << 9,
    UAVGraphics               = 1 << 10,
    RTV                       = 1 << 11,
    CopyDest                  = 1 << 12,
    ResolveDst                = 1 << 13,
    DSVWrite                  = 1 << 14,
    BVHRead                   = 1 << 15,
    BVHWrite                  = 1 << 16,
    Discard                   = 1 << 17,
    ShadingRateSource         = 1 << 18,
    Last                      = ShadingRateSource,
    None                      = Unknown,
    Mask                      = (Last << 1) - 1,
    SRVMask                   = SRVCompute | SRVGraphics,
    UAVMask                   = UAVCompute | UAVGraphics,
    ReadOnlyExclusiveMask     = CPURead | Present | IndirectArgs | VertexOrIndexBuffer | SRVGraphics | SRVCompute | CopySrc | ResolveSrc | BVHRead,
    ReadOnlyMask              = ReadOnlyExclusiveMask | DSVRead | ShadingRateSource,
    ReadableMask              = ReadOnlyMask | UAVMask,
    WriteOnlyExclusiveMask    = RTV | CopyDest | ResolveDst,
    WriteOnlyMask             = WriteOnlyExclusiveMask | DSVWrite,
    WritableMask              = WriteOnlyMask | UAVMask | BVHWrite,
}

Values

Name

Description

Unknown

Used when the previous state of a resource is not known, which implies we have to flush all GPU caches etc.

CPURead

Read states.

Present

IndirectArgs

VertexOrIndexBuffer

SRVCompute

SRVGraphics

CopySrc

ResolveSrc

DSVRead

UAVCompute

Read-write states.

UAVGraphics

RTV

CopyDest

ResolveDst

DSVWrite

BVHRead

Ray tracing acceleration structure states.

BVHWrite

Discard

Invalid released state (transient resources)

ShadingRateSource

Shading Rate Source.

Last

None

Mask

SRVMask

A mask of the two possible SRV states.

UAVMask

A mask of the two possible UAV states.

ReadOnlyExclusiveMask

A mask of all bits representing read-only states which cannot be combined with other write states.

ReadOnlyMask

A mask of all bits representing read-only states which may be combined with other write states.

ReadableMask

A mask of all bits representing readable states which may also include writable states.

WriteOnlyExclusiveMask

A mask of all bits representing write-only states which cannot be combined with other read states.

WriteOnlyMask

A mask of all bits representing write-only states which may be combined with other read states.

WritableMask

A mask of all bits representing writable states which may also include readable states.