ERHIAccess

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,
    ShadingRateSource         = 1 << 15,
    Last                      = DSVWrite,
    None                      = Unknown,
    Mask                      = (Last << 1) - 1,
    SRVMask                   = SRVCompute | SRVGraphics,
    UAVMask                   = UAVCompute | UAVGraphics,
    ReadOnlyExclusiveMask     = CPURead | Present | IndirectArgs | VertexOrIndexBuffer | SRVGraphics | SRVCompute | CopySrc | ResolveSrc,
    ReadOnlyMask              = ReadOnlyExclusiveMask | DSVRead | ShadingRateSource,
    ReadableMask              = ReadOnlyMask | UAVMask,
    WriteOnlyExclusiveMask    = RTV | CopyDest | ResolveDst,
    WriteOnlyMask             = WriteOnlyExclusiveMask | DSVWrite,
    WritableMask              = WriteOnlyMask | UAVMask,
    EReadable                 = ReadOnlyMask,
    EWritable                 = WritableMask,
    ERWBarrier                = CopySrc | CopyDest | SRVCompute | SRVGraphics | UAVCompute | UAVGraphics,
    ERWNoBarrier              = ERWBarrier,
}

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

ShadingRateSource

Custom (special) states:

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.

EReadable

These are for compatibility with the legacy RHITransitionResources API implementation. Do not use these when writing new rendering code/features.

EWritable

ERWBarrier

ERWNoBarrier

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss