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,
    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,
    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

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback