![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <RHIGlobals.h>
Classes | |
| struct | FGpuInfo |
| struct | FRayTracing |
| struct | FReservedResources |
| struct | FShaderBundles |
| struct | FVariableRateShading |
Public Member Functions | |
| RHI_API | FRHIGlobals () |
| RHI_API | ~FRHIGlobals () |
Static Public Attributes | |
| static constexpr int32 | MinGuaranteedSimultaneousUAVs = 8 |
| FRHIGlobals::FRHIGlobals | ( | ) |
|
default |
| PRAGMA_DISABLE_DEPRECATION_WARNINGS ERHIBindlessSupport FRHIGlobals::BindlessSupport = ERHIBindlessSupport::Unsupported |
| PRAGMA_ENABLE_DEPRECATION_WARNINGS bool FRHIGlobals::bSupportsBindless = false |
Whether dynamic (bindless) resources are supported
| FVector2f FRHIGlobals::DefaultMSAASampleOffsets[1+2+4+8+16] |
Tables of all MSAA sample offset for all MSAA supported. Use GetMSAASampleOffsets() to read it.
| uint64 FRHIGlobals::DemotedLocalMemorySize = 0 |
Amount of local video memory demoted to system memory. In bytes.
Whether or not the current GPU is integrated into to CPU
The size to check against for Draw*UP call index counts. If greater than this value, the draw call will not occur.
The size to check against for Draw*UP call vertex counts. If greater than this value, the draw call will not occur.
Allow opt-out default RHI resource deletion latency for streaming textures
| struct FRHIGlobals::FGpuInfo FRHIGlobals::GpuInfo |
| FString FRHIGlobals::GPUTraceFileName |
Non-empty if we are performing a gpu trace. Also says where to place trace file.
true if the GPU supports hidden surface removal in hardware.
| EPixelFormat FRHIGlobals::HDRDisplayOutputFormat = PF_FloatRGBA |
Format used for the backbuffer when outputting to a HDR display.
True if the RHI has initialized a device with the debug layer enabled.
If true, then avoiding loading shader code and instead force the "native" path, which sends a library and a hash instead.
| TRHIGlobal<int32> FRHIGlobals::MaxComputeDispatchDimension = ((1 << 16) - 1) |
The maximum size allowed for a computeshader dispatch.
| TRHIGlobal<int64> FRHIGlobals::MaxComputeSharedMemory = (1 << 15) |
The maximum size allowed for Shared Compute Memory.
| TRHIGlobal<int64> FRHIGlobals::MaxConstantBufferByteSize = (1 << 27) |
The maximum size allowed for a contant buffer.
| TRHIGlobal<int32> FRHIGlobals::MaxCubeTextureDimensions = 2048 |
The maximum size allowed for cube textures.
| FIntVector FRHIGlobals::MaxDispatchThreadGroupsPerDimension = FIntVector::ZeroValue |
The maximum number of groups that can be dispatched in each dimensions.
The maximum number of in-flight GPU queries the current RHI can handle without stalling and waiting for the GPU. Used to tune the occlusion culler to avoid stalls.
| int32 FRHIGlobals::MaximumWaveSize = 0 |
| TRHIGlobal<int32> FRHIGlobals::MaxShadowDepthBufferSizeX = 2048 |
The maximum size to allow for the shadow depth buffer in the X dimension. This must be larger or equal to GMaxShadowDepthBufferSizeY.
| TRHIGlobal<int32> FRHIGlobals::MaxShadowDepthBufferSizeY = 2048 |
The maximum size to allow for the shadow depth buffer in the Y dimension.
| int32 FRHIGlobals::MaxSimultaneousUAVs = MinGuaranteedSimultaneousUAVs |
The maximum number of simultaneously bound UAV's across all stages in a single pipeline
| int32 FRHIGlobals::MaxTextureArrayLayers = 256 |
The Maximum number of layers in a 1D or 2D texture array.
| TRHIGlobal<int32> FRHIGlobals::MaxTextureDimensions = 2048 |
The maximum size allowed for 2D textures in both dimensions.
| int32 FRHIGlobals::MaxTextureMipCount = MAX_TEXTURE_MIP_COUNT |
The maximum number of mip-maps that a texture can contain.
| int32 FRHIGlobals::MaxTextureSamplers = 16 |
| TRHIGlobal<uint64> FRHIGlobals::MaxViewDimensionForTypedBuffer = (1ULL << 32) |
The maximum number of elements allowed for Typed Buffers.
| TRHIGlobal<uint64> FRHIGlobals::MaxViewSizeBytesForNonTypedBuffer = (1ULL << 32) |
The maximum size(in Bytes) for non Typed Buffers.
| TRHIGlobal<int32> FRHIGlobals::MaxVolumeTextureDimensions = 2048 |
The maximum size allowed for 3D textures in all three dimensions.
| TRHIGlobal<int32> FRHIGlobals::MaxWorkGroupInvocations = 1024 |
The maximum work group invocations allowed for compute shader.
The guaranteed minimum number of simultaneously bound UAV's across all stages in a single pipeline
| int32 FRHIGlobals::MinimumWaveSize = 0 |
Specifies the minimum and maximum number of lanes in the SIMD wave that this GPU can support. I.e. 32 on NVIDIA, 64 on AMD. Valid values are in range [4..128] (as per SM 6.0 specification) or 0 if unknown. Rendering code must always check SupportsWaveOperations in addition to wave min/max size.
Does this RHI need to wait for deletion of resources due to ref counting.
True if RHI needs the transitions from the high level for COPYSRC/COPYDEST
True if the RHI needs shader unbinds (SetShaderUnbinds). RHIs that don't need them can avoid creating extra commands.
True if RHI is unable to service transitioning to ERHIAccess::Discard from all pipes to async compute.
True if RHI needs to track states when transitioning between Discard.
True if the RHI has artifacts with atlased CSM depths.
Amount of memory allocated by non streaming textures. In kilobytes.
Used for parallel render pass support. When true, indicates that the platform RHI requires that the child command list translations in a parallel render pass are completed before the remainder of the parent command list can be translated.
Used for parallel render pass support. When true, indicates that the platform RHI requires that child command list translations in a parallel render pass do not start until the parent command list translation has reached the BeginParallelRenderPass command.
| int32 FRHIGlobals::PersistentThreadGroupCount = 0 |
Optimal number of persistent thread groups to fill the GPU.
| int32 FRHIGlobals::PoolSizeVRAMPercentage = 0 |
In percent. If non-zero, the texture pool size is a percentage of TotalGraphicsMemory.
Preferred format of FShaderCode (binary code or microcode). Only used for preview platforms with more than one shader code being supported such as D3D12 (supports DXIL and DXBC).
| uint64 FRHIGlobals::PresentCounter = 1 |
Counter incremented once on each frame present. Used to support game thread synchronization with swap chain frame flips.
| struct FRHIGlobals::FRayTracing FRHIGlobals::RayTracing |
true if the RHI requires a valid RT bound during UAV scatter operation inside the pixel shader
| struct FRHIGlobals::FReservedResources FRHIGlobals::ReservedResources |
If an RHI is so slow, that it is the limiting factor for the entire frame, we can kick early to try to give it as much as possible.
| struct FRHIGlobals::FShaderBundles FRHIGlobals::ShaderBundles |
| EShaderPlatform FRHIGlobals::ShaderPlatformForFeatureLevel[ERHIFeatureLevel::Num] |
Table for finding out which shader platform corresponds to a given feature level for this RHI.
Amount of memory allocated by streaming textures. In kilobytes.
True if RHI supports Linear texture format in 3D/Cube/Array texture
True if the RHI supports setting the render target array index from any shader stage
True if the RHI supports aliasing transient resources on the async compute pipe.
Whether RHIGetRenderQueryResult can be safely called off the render thread.
True if the RHI supports pipeline precompiling from any thread.
true if the RHI supports asynchronous creation of texture resources
Support using async thread for texture stream out operations
Whether or not the RHI can render to the backbuffer with a custom depth/stencil surface bound.
True if the RHI supports shaders with barycentrics
Whether or not the RHI can handle a non-zero BaseVertexIndex - extra SetStreamSource calls will be needed if this is false
True if RHI supports supports using any slice or all slices of a texture array as render targets without creating the texture with the TargetArraySlicesIndependently flag.
Whether current RHI supports overestimated conservative rasterization.
True if the RHI and current hardware supports supports depth bounds testing
Whether Depth Stencil MSAA Resolve Targets are supported.
True if the RHI supports depth target unordered access views.
true if the pointer returned by Lock is a persistent direct pointer to gpu memory
true if the RHI supports 64 bit uint atomics using DX12 SM6.6 - TEMP / DEPRECATED - DO NOT USE
Whether or not the RHI can handle dynamic resolution or not.
True if the RHI and current hardware supports efficient AsyncCompute (by default we assume false and later we can enable this for more hardware)
Some RHIs can only do visible or not occlusion queries.
True if the RHI supports explicit access to MSAA target FMask meta data.
True if the RHI supports explicit access to depth target HTile meta data.
Whether or not the RHI can handle a non-zero FirstInstance to DrawIndexedPrimitive and friends - extra SetStreamSource calls will be needed if this is false
true if RHIGetGPUFrameCycles removes CPu generated bubbles.
true if RQT_AbsoluteTime is supported by RHICreateRenderQuery
true if RHIGetGPUUsage() is supported.
Whether the present adapter/display offers HDR output capabilities.
If true, then it is possible to turn on LazyShaderCodeLoading.
True if lossy/fixed-rate compression of render targets is supporterd.
true if the RHI supports RLM_WriteOnly_NoOverwrite
true if the RHI supports Mesh and Amplification shaders with tier0 capability
true if the RHI supports Mesh and Amplification shaders with tier1 capability
Whether or not the RHI can perform MSAA sample load.
True if RHI supports MSAA resolve with a custom shader
true if the RHI supports Multi Draw Indirect, a variant of Draw Indirect with variable number of sub-commands generated by GPU
Does the RHI support parallel resource commands (i.e. create / lock / unlock) on non-immediate command list APIs, recorded off the render thread.
true if the multi-threaded shader creation is supported by (or desirable for) the RHI.
Whether or not the RHI supports 16bit VALU and resource loads (HLSL shader model 6.2).
True if the RHI supports getting the result of occlusion queries when on a thread other than the render thread
Temporary. When OpenGL is running in a separate thread, it cannot yet do things like initialize shaders that are first discovered in a rendering task. It is doable, it just isn't done.
Enables support for platforms that use render passes to split command list translation across multiple threads. For platforms that require dependencies on Parent/Child command lists i.e. requiring translation of children to be complete before finishing translation of the parent, should use ParallelRHIExecuteChildWait and/or ParallelRHIExecuteParentWait
Whether or not the RHI supports parallel RHIThread executes / translates Requirements: RHICreateBoundShaderState & RHICreateGraphicsPipelineState is threadsafe and GetCachedBoundShaderState must not be used. GetCachedBoundShaderState_Threadsafe has a slightly different protocol.
True if the pipeline file cache can be used with this RHI
true if the RHI supports optimal low level pipeline state sort keys.
true if this platform has quad buffer stereo support.
true if the RHI supports quad topology (PT_QuadList).
Whether a raw (ByteAddress) buffer view can be created for any buffer, regardless of its EBufferUsageFlags::ByteAddressBuffer flag.
true if the RHI supports rectangular topology (PT_RectList).
true if the RHI supports textures that may be bound as both a render target and a shader resource.
| TRHIGlobal<bool> FRHIGlobals::SupportsRenderTargetFormat_PF_FloatRGBA = true |
true if PF_FloatRGBA render targets are supported
| TRHIGlobal<bool> FRHIGlobals::SupportsRenderTargetFormat_PF_G8 = true |
true if PF_G8 render targets are supported
True if the RHI supports resummarizing depth target HTile meta data.
Whether depth or stencil can individually be set to CopySrc/Dest access.
True if the RHI supports separate blend states per render target.
true if mobile depth & stencil fetch is supported
true if the RHI supports shader execution reordering.
true if mobile framebuffer fetch is supported
true if mobile framebuffer fetch can be used for programmable blending, does not imply that framebuffer fetch is supported
true if mobile framebuffer fetch is supported from MRT's
Whether current RHI supports shader root constants.
True if the RHI supports reading system timer in shaders via GetShaderTimestamp(). Individual shaders must be compiled with an appropriate vendor extension and check PLATFORM_SUPPORTS_SHADER_TIMESTAMP.
Whether current RHI supports work graphs with tier1_0 capability.
Whether current RHI supports work graphs with tier1_1 capability.
True if the RHI supports setting the stencil ref at pixel granularity from the pixel shader
Whether to initialize 3D textures using a bulk data (or through a mip update if false).
true if the RHI supports texture views (data aliasing)
true if RQT_AbsoluteTime is supported by RHICreateRenderQuery
true if the RHI supports unordered access view format aliasing
true if the RHI supports UpdateFromBufferTexture method
True if and only if the GPU support rendering to volume textures (2D Array, 3D). Some OpenGL 3.3 cards support SM4, but can't render to volume textures.
Whether or not the RHI supports shader wave operations (shader model 6.0).
| int64 FRHIGlobals::TexturePoolSize = 0 * 1024 * 1024 |
Current texture streaming pool size, in bytes. 0 means unlimited.
| ERequestedGPUCrash FRHIGlobals::TriggerGPUCrash = ERequestedGPUCrash::None |
Whether an intentional GPU crash has been scheduled.
Amount of memory allocated by uniform buffers
| struct FRHIGlobals::FVariableRateShading FRHIGlobals::VariableRateShading |
| FVertexElementTypeSupportInfo FRHIGlobals::VertexElementTypeSupport |
true for each VET that is supported. One-to-one mapping with EVertexElementType