UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RHI.h File Reference
#include "Containers/ContainersFwd.h"
#include "RHIDefinitions.h"
#include "Templates/TypeHash.h"
#include "Containers/StaticArray.h"
#include "Containers/StringFwd.h"
#include "Math/IntRect.h"
#include "Math/PerspectiveMatrix.h"
#include "Math/ScaleMatrix.h"
#include "Math/TranslationMatrix.h"
#include "PixelFormat.h"
#include "GpuProfilerTrace.h"
#include "RHIShaderPlatform.h"
#include "RHIFeatureLevel.h"
#include "RHIAccess.h"
#include "RHIGlobals.h"
#include "MultiGPU.h"
#include "RHIResources.h"
#include "DynamicRHI.h"

Go to the source code of this file.

Classes

struct  FRHIResourceStats
 
struct  FVertexElement
 
struct  FSamplerStateInitializerRHI
 
struct  FRasterizerStateInitializerRHI
 
struct  FDepthStencilStateInitializerRHI
 
class  FBlendStateInitializerRHI
 
struct  FBlendStateInitializerRHI::FRenderTarget
 
struct  FViewportBounds
 
struct  FVRamAllocation
 
struct  FRHIResourceInfo
 
struct  FRHIDispatchIndirectParametersNoPadding
 
struct  FRHIDispatchIndirectParameters
 
struct  FRHIDrawIndirectParameters
 
struct  FRHIDrawIndexedIndirectParameters
 

Namespaces

namespace  UE
 
namespace  UE::RHI
 

Typedefs

typedef TArray< FVertexElement, TFixedAllocator< MaxVertexElementCount > > FVertexDeclarationElementList
 

Functions

RHI_API bool IsRHIDeviceAMD ()
 
RHI_API bool IsRHIDeviceIntel ()
 
RHI_API bool IsRHIDeviceNVIDIA ()
 
RHI_API bool IsRHIDeviceQualcomm ()
 
RHI_API bool IsRHIDeviceApple ()
 
RHI_API bool UE::RHI::UseGPUCrashDebugging ()
 
RHI_API bool UE::RHI::UseGPUCrashBreadcrumbs ()
 
RHI_API bool UE::RHI::ShouldEnableGPUCrashFeature (IConsoleVariable &CVar, TCHAR const *CommandLineSwitch)
 
RHI_API uint32 RHIGetMetalShaderLanguageVersion (const FStaticShaderPlatform Platform)
 
RHI_API bool RHIGetPreviewFeatureLevel (ERHIFeatureLevel::Type &PreviewFeatureLevelOUT)
 
RHI_API EPixelFormat RHIPreferredPixelFormatHint (EPixelFormat PreferredPixelFormat)
 
RHI_API int32 RHIGetPreferredClearUAVRectPSResourceType (const FStaticShaderPlatform Platform)
 
RHI_API void RHIDumpResourceMemoryToCSV ()
 
RHI_API bool RHISupportsVolumeTextureRendering (const FStaticShaderPlatform Platform)
 
RHI_API void RHIGetTrackedResourceStats (TArray< TSharedPtr< FRHIResourceStats > > &OutResourceStats)
 
RHI_API int32 CalculateMSAASampleArrayIndex (int32 NumSamples, int32 SampleIndex)
 
FVector2f GetMSAASampleOffsets (int32 NumSamples, int32 SampleIndex)
 
RHI_API void RHIInitDefaultPixelFormatCapabilities ()
 
bool RHIPixelFormatHasCapabilities (EPixelFormat InFormat, EPixelFormatCapabilities InCapabilities)
 
bool RHIIsTypedUAVLoadSupported (EPixelFormat InFormat)
 
bool RHIIsTypedUAVStoreSupported (EPixelFormat InFormat)
 
RHI_API SIZE_T CalculateImageBytes (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format)
 
FMatrix AdjustProjectionMatrixForRHI (const FMatrix &InProjectionMatrix)
 
RHI_API void RHISetMobilePreviewFeatureLevel (ERHIFeatureLevel::Type MobilePreviewFeatureLevel)
 
RHI_API void RHIInit (bool bHasEditorToken)
 
RHI_API void RHIPostInit (const TArray< uint32 > &InPixelFormatByteWidth)
 
RHI_API void RHIExit ()
 
RHI_API void RHIDetectAndWarnOfBadDrivers (bool bHasEditorToken)
 
 DECLARE_DELEGATE_OneParam (FRHIPanicEvent, const FName &)
 
RHI_API FRHIPanicEventRHIGetPanicDelegate ()
 
uint32 GetExpectedFeatureLevelMaxTextureSamplers (const FStaticFeatureLevel FeatureLevel)
 
RHI_API bool RHIGetShaderPlatformConfigurationInt (int32 &OutSetting, FConfigCacheIni *Config, EShaderPlatform Platform, const TCHAR *SettingName)
 
RHI_API bool RHIGetShaderPlatformConfigurationString (FString &OutSetting, FConfigCacheIni *Config, EShaderPlatform Platform, const TCHAR *SettingName)
 
RHI_API TOptional< ERHIBindlessConfigurationRHIGetForcedBindlessConfiguration ()
 
RHI_API ERHIBindlessConfiguration RHIParseBindlessConfiguration (EShaderPlatform Platform, const FString &ConfigSetting, const FString &CvarSetting)
 
RHI_API ERHIBindlessConfiguration RHIGetRuntimeBindlessConfiguration (EShaderPlatform Platform)
 
ERHIBindlessConfiguration RHIGetRuntimeBindlessResourcesConfiguration (EShaderPlatform Platform)
 
ERHIBindlessConfiguration RHIGetRuntimeBindlessSamplersConfiguration (EShaderPlatform Platform)
 

Typedef Documentation

◆ FVertexDeclarationElementList

Function Documentation

◆ AdjustProjectionMatrixForRHI()

FMatrix AdjustProjectionMatrixForRHI ( const FMatrix InProjectionMatrix)
inline

Adjusts a projection matrix to output in the correct clip space for the current RHI. Unreal projection matrices follow certain conventions and need to be patched for some RHIs. All projection matrices should be adjusted before being used for rendering!

◆ CalculateImageBytes()

RHI_API SIZE_T CalculateImageBytes ( uint32  SizeX,
uint32  SizeY,
uint32  SizeZ,
uint8  Format 
)
extern

Returns the memory required to store an image in the given pixel format (EPixelFormat). Use GPixelFormats[Format].Get2D/3DImageSizeInBytes instead, unless you need PF_A1.

◆ CalculateMSAASampleArrayIndex()

RHI_API int32 CalculateMSAASampleArrayIndex ( int32  NumSamples,
int32  SampleIndex 
)
extern

◆ DECLARE_DELEGATE_OneParam()

DECLARE_DELEGATE_OneParam ( FRHIPanicEvent  ,
const FName  
)

◆ GetExpectedFeatureLevelMaxTextureSamplers()

uint32 GetExpectedFeatureLevelMaxTextureSamplers ( const FStaticFeatureLevel  FeatureLevel)
inline

◆ GetMSAASampleOffsets()

FVector2f GetMSAASampleOffsets ( int32  NumSamples,
int32  SampleIndex 
)
inline

◆ IsRHIDeviceAMD()

RHI_API bool IsRHIDeviceAMD ( )

RHI configuration settings. RHI capabilities.

◆ IsRHIDeviceApple()

RHI_API bool IsRHIDeviceApple ( )

◆ IsRHIDeviceIntel()

RHI_API bool IsRHIDeviceIntel ( )

◆ IsRHIDeviceNVIDIA()

RHI_API bool IsRHIDeviceNVIDIA ( )

◆ IsRHIDeviceQualcomm()

RHI_API bool IsRHIDeviceQualcomm ( )

◆ RHIDetectAndWarnOfBadDrivers()

RHI_API void RHIDetectAndWarnOfBadDrivers ( bool  bHasEditorToken)
extern

◆ RHIDumpResourceMemoryToCSV()

RHI_API void RHIDumpResourceMemoryToCSV ( )

◆ RHIExit()

RHI_API void RHIExit ( )
extern

Shuts down the RHI.

◆ RHIGetForcedBindlessConfiguration()

RHI_API TOptional< ERHIBindlessConfiguration > RHIGetForcedBindlessConfiguration ( )

◆ RHIGetMetalShaderLanguageVersion()

RHI_API uint32 RHIGetMetalShaderLanguageVersion ( const FStaticShaderPlatform  Platform)

◆ RHIGetPanicDelegate()

RHI_API FRHIPanicEvent & RHIGetPanicDelegate ( )
extern

◆ RHIGetPreferredClearUAVRectPSResourceType()

RHI_API int32 RHIGetPreferredClearUAVRectPSResourceType ( const FStaticShaderPlatform  Platform)

◆ RHIGetPreviewFeatureLevel()

RHI_API bool RHIGetPreviewFeatureLevel ( ERHIFeatureLevel::Type PreviewFeatureLevelOUT)

◆ RHIGetRuntimeBindlessConfiguration()

RHI_API ERHIBindlessConfiguration RHIGetRuntimeBindlessConfiguration ( EShaderPlatform  Platform)

◆ RHIGetRuntimeBindlessResourcesConfiguration()

ERHIBindlessConfiguration RHIGetRuntimeBindlessResourcesConfiguration ( EShaderPlatform  Platform)
inline

◆ RHIGetRuntimeBindlessSamplersConfiguration()

ERHIBindlessConfiguration RHIGetRuntimeBindlessSamplersConfiguration ( EShaderPlatform  Platform)
inline

◆ RHIGetShaderPlatformConfigurationInt()

RHI_API bool RHIGetShaderPlatformConfigurationInt ( int32 OutSetting,
FConfigCacheIni Config,
EShaderPlatform  Platform,
const TCHAR SettingName 
)

◆ RHIGetShaderPlatformConfigurationString()

RHI_API bool RHIGetShaderPlatformConfigurationString ( FString &  OutSetting,
FConfigCacheIni Config,
EShaderPlatform  Platform,
const TCHAR SettingName 
)

◆ RHIGetTrackedResourceStats()

RHI_API void RHIGetTrackedResourceStats ( TArray< TSharedPtr< FRHIResourceStats > > &  OutResourceStats)

◆ RHIInit()

RHI_API void RHIInit ( bool  bHasEditorToken)
extern

Initializes the RHI.

◆ RHIInitDefaultPixelFormatCapabilities()

RHI_API void RHIInitDefaultPixelFormatCapabilities ( )
extern

Initialize the 'best guess' pixel format capabilities. Platform formats and support must be filled out before calling this.

◆ RHIIsTypedUAVLoadSupported()

bool RHIIsTypedUAVLoadSupported ( EPixelFormat  InFormat)
inline

◆ RHIIsTypedUAVStoreSupported()

bool RHIIsTypedUAVStoreSupported ( EPixelFormat  InFormat)
inline

◆ RHIParseBindlessConfiguration()

RHI_API ERHIBindlessConfiguration RHIParseBindlessConfiguration ( EShaderPlatform  Platform,
const FString &  ConfigSetting,
const FString &  CvarSetting 
)

◆ RHIPixelFormatHasCapabilities()

bool RHIPixelFormatHasCapabilities ( EPixelFormat  InFormat,
EPixelFormatCapabilities  InCapabilities 
)
inline

◆ RHIPostInit()

RHI_API void RHIPostInit ( const TArray< uint32 > &  InPixelFormatByteWidth)
extern

Performs additional RHI initialization before the render thread starts.

◆ RHIPreferredPixelFormatHint()

RHI_API EPixelFormat RHIPreferredPixelFormatHint ( EPixelFormat  PreferredPixelFormat)

◆ RHISetMobilePreviewFeatureLevel()

RHI_API void RHISetMobilePreviewFeatureLevel ( ERHIFeatureLevel::Type  MobilePreviewFeatureLevel)

Set runtime selection of mobile feature level preview.

◆ RHISupportsVolumeTextureRendering()

RHI_API bool RHISupportsVolumeTextureRendering ( const FStaticShaderPlatform  Platform)