SupportsMultiViewport

SupportsMultiViewport

#Overview

name: SupportsMultiViewport

The value of this variable can be defined or overridden in .ini config files. 7 .ini config files referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of SupportsMultiViewport is to indicate the level of support for multiple viewports in the rendering system of Unreal Engine 5. This setting variable is used to determine the capabilities of the current rendering hardware platform regarding multi-viewport rendering.

This setting variable is primarily used in the RHI (Rendering Hardware Interface) module of Unreal Engine 5. It is part of the data-driven shader platform information system, which allows the engine to adapt to different hardware capabilities.

The value of this variable is set during the parsing of data-driven shader information. It is populated in the FGenericDataDrivenShaderPlatformInfo class, specifically in the ParseDataDrivenShaderInfo function.

SupportsMultiViewport interacts with other rendering capability flags in the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsIndexBufferUAVs, bSupportsInstancedStereo, and bSupportsMSAA. These flags collectively describe the rendering features supported by the current platform.

Developers must be aware that this variable uses an enumeration (ERHIFeatureSupport) to represent different levels of support, rather than a simple boolean. This allows for more nuanced representation of multi-viewport capabilities.

Best practices when using this variable include:

  1. Always check the support level before attempting to use multi-viewport features.
  2. Use the GetSupportsMultiViewport static function to access this value, ensuring type safety and proper initialization checks.
  3. Consider fallback rendering methods for platforms with limited or no multi-viewport support.
  4. Be aware that this setting may affect performance and adjust your rendering pipeline accordingly based on the support level.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:48, section: [ShaderPlatform METAL_SM5]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:88, section: [ShaderPlatform METAL_SM6]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:40, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:168, section: [ShaderPlatform VULKAN_SM6]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:73, section: [ShaderPlatform PCD3D_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:134, section: [ShaderPlatform PCD3D_SM6]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:163, section: [ShaderPlatform PCD3D_ES3_1]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:213

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsIndexBufferUAVs);
	GET_SECTION_BOOL_HELPER(bSupportsInstancedStereo);
	GET_SECTION_SUPPORT_HELPER(SupportsMultiViewport);
	GET_SECTION_BOOL_HELPER(bSupportsMSAA);
	GET_SECTION_BOOL_HELPER(bSupports4ComponentUAVReadWrite);
	GET_SECTION_BOOL_HELPER(bSupportsShaderRootConstants);
	GET_SECTION_BOOL_HELPER(bSupportsShaderBundleDispatch);
	GET_SECTION_BOOL_HELPER(bSupportsRenderTargetWriteMask);
	GET_SECTION_BOOL_HELPER(bSupportsRayTracing);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:39

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsIndexBufferUAVs : 1;
	uint32 bSupportsInstancedStereo : 1;
	uint32 SupportsMultiViewport : int32(ERHIFeatureSupport::NumBits);
	uint32 bSupportsMSAA : 1;
	uint32 bSupports4ComponentUAVReadWrite : 1;
	uint32 bSupportsShaderRootConstants : 1;
	uint32 bSupportsShaderBundleDispatch : 1;
	uint32 bSupportsRenderTargetWriteMask : 1;
	uint32 bSupportsRayTracing : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:293

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const ERHIFeatureSupport GetSupportsMultiViewport

Source code excerpt:

	{
		check(IsValid(Platform));
		return ERHIFeatureSupport(Infos[Platform].SupportsMultiViewport);
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsMSAA(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsMSAA;