UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RHIUtilities.h File Reference

Go to the source code of this file.

Classes

struct  FTextureRWBuffer
 
struct  FRWBuffer
 
struct  FTextureReadBuffer2D
 
struct  FReadBuffer
 
struct  FRWBufferStructured
 
struct  FByteAddressBuffer
 
struct  FRWByteAddressBuffer
 
struct  FDynamicReadBuffer
 
class  FDumpTransitionsHelper
 

Macros

#define ENABLE_TRANSITION_DUMP   1
 
#define DUMP_TRANSITION(ResourceName, TransitionType)   FDumpTransitionsHelper::DumpResourceTransition(ResourceName, TransitionType);
 

Functions

EPixelFormat GetBlockCompressedFormatUAVAliasFormat (EPixelFormat Format)
 
bool IsUnormFormat (EPixelFormat Format)
 
bool IsSnormFormat (EPixelFormat Format)
 
bool IsUintFormat (EPixelFormat Format)
 
bool IsSintFormat (EPixelFormat Format)
 
RHI_API ERHIAccess RHIGetDefaultResourceState (ETextureCreateFlags InUsage, bool bInHasInitialData)
 
RHI_API ERHIAccess RHIGetDefaultResourceState (EBufferUsageFlags InUsage, bool bInHasInitialData)
 
RHI_API void DecodeRenderTargetMode (ESimpleRenderTargetMode Mode, ERenderTargetLoadAction &ColorLoadAction, ERenderTargetStoreAction &ColorStoreAction, ERenderTargetLoadAction &DepthLoadAction, ERenderTargetStoreAction &DepthStoreAction, ERenderTargetLoadAction &StencilLoadAction, ERenderTargetStoreAction &StencilStoreAction, FExclusiveDepthStencil DepthStencilUsage)
 
void TransitionRenderPassTargets (FRHICommandList &RHICmdList, const FRHIRenderPassInfo &RPInfo)
 
void ClearRenderTarget (FRHICommandList &RHICmdList, FRHITexture *Texture, uint32 MipIndex=0, uint32 ArraySlice=0)
 
void TransitionAndCopyTexture (FRHICommandList &RHICmdList, FRHITexture *SrcTexture, FRHITexture *DstTexture, const FRHICopyTextureInfo &Info)
 
uint32 GetVertexCountForPrimitiveCount (uint32 NumPrimitives, uint32 PrimitiveType)
 
uint32 ComputeAnisotropyRT (int32 InitializerMaxAnisotropy)
 
RHI_API void SetDepthBoundsTest (FRHICommandList &RHICmdList, float WorldSpaceDepthNear, float WorldSpaceDepthFar, const FMatrix &ProjectionMatrix)
 
RHI_API uint32 RHIGetSyncInterval ()
 
RHI_API float RHIGetSyncSlackMS ()
 
RHI_API void RHIGetPresentThresholds (float &OutTopPercent, float &OutBottomPercent)
 
RHI_API bool RHIGetSyncAllowVariable ()
 
void RHICompleteGraphEventOnFlip (uint64 PresentIndex, FGraphEventRef Event)
 
RHI_API void RHITriggerTaskEventOnFlip (uint64 PresentIndex, const UE::Tasks::FTaskEvent &TaskEvent)
 
RHI_API void RHISetFrameDebugInfo (uint64 PresentIndex, uint64 FrameIndex, uint64 InputTime)
 
RHI_API void RHISetVsyncDebugInfo (FRHIFlipDetails &NewFlipFrame)
 
RHI_API void RHIInitializeFlipTracking ()
 
RHI_API void RHIShutdownFlipTracking ()
 
RHI_API float RHIGetFrameTime ()
 
RHI_API void RHICalculateFrameTime ()
 
RHI_API EGpuVendorId RHIGetPreferredAdapterVendor ()
 

Macro Definition Documentation

◆ DUMP_TRANSITION

#define DUMP_TRANSITION (   ResourceName,
  TransitionType 
)    FDumpTransitionsHelper::DumpResourceTransition(ResourceName, TransitionType);

◆ ENABLE_TRANSITION_DUMP

#define ENABLE_TRANSITION_DUMP   1

Function Documentation

◆ ClearRenderTarget()

void ClearRenderTarget ( FRHICommandList RHICmdList,
FRHITexture Texture,
uint32  MipIndex = 0,
uint32  ArraySlice = 0 
)
inline

Performs a clear render pass on an RHI texture. The texture is expected to be in the RTV state.

◆ ComputeAnisotropyRT()

uint32 ComputeAnisotropyRT ( int32  InitializerMaxAnisotropy)
inline

◆ DecodeRenderTargetMode()

RHI_API void DecodeRenderTargetMode ( ESimpleRenderTargetMode  Mode,
ERenderTargetLoadAction ColorLoadAction,
ERenderTargetStoreAction ColorStoreAction,
ERenderTargetLoadAction DepthLoadAction,
ERenderTargetStoreAction DepthStoreAction,
ERenderTargetLoadAction StencilLoadAction,
ERenderTargetStoreAction StencilStoreAction,
FExclusiveDepthStencil  DepthStencilUsage 
)

Convert the ESimpleRenderTargetMode into usable values

◆ GetBlockCompressedFormatUAVAliasFormat()

EPixelFormat GetBlockCompressedFormatUAVAliasFormat ( EPixelFormat  Format)
inline

◆ GetVertexCountForPrimitiveCount()

uint32 GetVertexCountForPrimitiveCount ( uint32  NumPrimitives,
uint32  PrimitiveType 
)
inline

Computes the vertex count for a given number of primitives of the specified type.

Parameters
NumPrimitivesThe number of primitives.
PrimitiveTypeThe type of primitives.
Returns
The number of vertices.

◆ IsSintFormat()

bool IsSintFormat ( EPixelFormat  Format)
inline

◆ IsSnormFormat()

bool IsSnormFormat ( EPixelFormat  Format)
inline

◆ IsUintFormat()

bool IsUintFormat ( EPixelFormat  Format)
inline

◆ IsUnormFormat()

bool IsUnormFormat ( EPixelFormat  Format)
inline

◆ RHICalculateFrameTime()

RHI_API void RHICalculateFrameTime ( )
extern

◆ RHICompleteGraphEventOnFlip()

void RHICompleteGraphEventOnFlip ( uint64  PresentIndex,
FGraphEventRef  Event 
)
inline

Signals the completion of the specified task graph event when the given frame has flipped.

◆ RHIGetDefaultResourceState() [1/2]

RHI_API ERHIAccess RHIGetDefaultResourceState ( EBufferUsageFlags  InUsage,
bool  bInHasInitialData 
)
extern

Get the best default resource state for the given buffer creation flags

◆ RHIGetDefaultResourceState() [2/2]

RHI_API ERHIAccess RHIGetDefaultResourceState ( ETextureCreateFlags  InUsage,
bool  bInHasInitialData 
)
extern

Get the best default resource state for the given texture creation flags

◆ RHIGetFrameTime()

RHI_API float RHIGetFrameTime ( )
extern

Sets the FrameIndex and InputTime for the current frame.

◆ RHIGetPreferredAdapterVendor()

RHI_API EGpuVendorId RHIGetPreferredAdapterVendor ( )
extern

Returns the VendorID of the preferred vendor or -1 if none were specified.

◆ RHIGetPresentThresholds()

RHI_API void RHIGetPresentThresholds ( float OutTopPercent,
float OutBottomPercent 
)
extern

Returns the top and bottom vsync present thresholds (the values of rhi.PresentThreshold.Top and rhi.PresentThreshold.Bottom)

◆ RHIGetSyncAllowVariable()

RHI_API bool RHIGetSyncAllowVariable ( )
extern

Returns the value of the rhi.SyncAllowVariable CVar.

◆ RHIGetSyncInterval()

RHI_API uint32 RHIGetSyncInterval ( )
extern

Returns the value of the rhi.SyncInterval CVar.

◆ RHIGetSyncSlackMS()

RHI_API float RHIGetSyncSlackMS ( )
extern

Returns the value of the rhi.SyncSlackMS CVar or length of a full frame interval if the frame offset system is disabled.

◆ RHIInitializeFlipTracking()

RHI_API void RHIInitializeFlipTracking ( )
extern

◆ RHISetFrameDebugInfo()

RHI_API void RHISetFrameDebugInfo ( uint64  PresentIndex,
uint64  FrameIndex,
uint64  InputTime 
)
extern

Sets the FrameIndex and InputTime for the current frame.

◆ RHISetVsyncDebugInfo()

RHI_API void RHISetVsyncDebugInfo ( FRHIFlipDetails NewFlipFrame)
extern

Sets the Vsync information for a new frame

◆ RHIShutdownFlipTracking()

RHI_API void RHIShutdownFlipTracking ( )
extern

◆ RHITriggerTaskEventOnFlip()

RHI_API void RHITriggerTaskEventOnFlip ( uint64  PresentIndex,
const UE::Tasks::FTaskEvent TaskEvent 
)
extern

◆ SetDepthBoundsTest()

RHI_API void SetDepthBoundsTest ( FRHICommandList RHICmdList,
float  WorldSpaceDepthNear,
float  WorldSpaceDepthFar,
const FMatrix ProjectionMatrix 
)
extern

◆ TransitionAndCopyTexture()

void TransitionAndCopyTexture ( FRHICommandList RHICmdList,
FRHITexture SrcTexture,
FRHITexture DstTexture,
const FRHICopyTextureInfo Info 
)
inline

◆ TransitionRenderPassTargets()

void TransitionRenderPassTargets ( FRHICommandList RHICmdList,
const FRHIRenderPassInfo RPInfo 
)
inline