SupportedRHIs

SupportedRHIs

#Overview

name: SupportedRHIs

The value of this variable can be defined or overridden in .ini config files. 8 .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 SupportedRHIs is to maintain a list of supported Rendering Hardware Interfaces (RHIs) for automation testing in Unreal Engine 5. This variable is primarily used in the context of automation testing and platform-specific settings.

SupportedRHIs is part of the AutomationTest module, specifically within the UAutomationTestExcludelistSettings class, which is derived from UAutomationTestPlatformSettings. This indicates that it’s used for managing platform-specific settings related to automation testing.

The value of this variable is set through configuration, as indicated by the UPROPERTY(Config) macro. This means that the values are likely defined in configuration files and can be adjusted without modifying the source code.

SupportedRHIs interacts with other parts of the automation testing system, particularly in functions that gather RHI options for different platforms. It’s used in conjunction with other platform-specific settings to provide a comprehensive view of supported RHIs across different platforms.

Developers must be aware that this variable is platform-specific and its values may differ depending on the target platform. It’s crucial to ensure that the RHIs listed here are actually supported on the respective platforms to avoid issues in automation testing.

Best practices when using this variable include:

  1. Regularly updating the list to reflect the current state of supported RHIs for each platform.
  2. Ensuring consistency between this list and the actual RHI support in the engine for each platform.
  3. Using the provided utility functions (GetAllRHIOptionNamesFromSettings and GetPlatformRHIOptionNamesFromSettings) to access the RHI information, rather than directly accessing the SupportedRHIs array.
  4. Considering this variable when writing or modifying automation tests that are sensitive to RHI differences.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3204, section: [AutomationTestExcludelistSettings:Windows]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3205, section: [AutomationTestExcludelistSettings:Windows]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3206, section: [AutomationTestExcludelistSettings:Windows]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3207, section: [AutomationTestExcludelistSettings:Windows]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3210, section: [AutomationTestExcludelistSettings:Linux]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3211, section: [AutomationTestExcludelistSettings:Linux]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3214, section: [AutomationTestExcludelistSettings:Mac]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3215, section: [AutomationTestExcludelistSettings:Mac]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/AutomationTest/Public/AutomationTestExcludelist.h:94

Scope (from outer to inner):

file
class        class UAutomationTestExcludelistSettings : public UAutomationTestPlatformSettings

Source code excerpt:


	UPROPERTY(Config)
	TArray<FName> SupportedRHIs;

protected:
	virtual void InitializeSettingsDefault() { }
	virtual FString GetSectionName() { return TEXT("AutomationTestExcludelistSettings"); }

};

#Loc: <Workspace>/Engine/Source/Runtime/AutomationTest/Public/AutomationTestExcludelist.h:136

Scope (from outer to inner):

file
function     static const TSet<FName>& GetAllRHIOptionNamesFromSettings

Source code excerpt:

			for (auto Settings : AutomationTestPlatform::GetAllPlatformsSettings(UAutomationTestExcludelistSettings::StaticClass()))
			{
				NameSet.Append(CastChecked<UAutomationTestExcludelistSettings>(Settings)->SupportedRHIs);
			}
			NameSet.Sort([](const FName& A, const FName& B) { return A.ToString() < B.ToString(); });
		}

		return NameSet;
	}

#Loc: <Workspace>/Engine/Source/Runtime/AutomationTest/Public/AutomationTestExcludelist.h:152

Scope (from outer to inner):

file
function     static const TSet<FName>& GetPlatformRHIOptionNamesFromSettings

Source code excerpt:

			for (auto Settings : AutomationTestPlatform::GetAllPlatformsSettings(UAutomationTestExcludelistSettings::StaticClass()))
			{
				PlatformSettings.Emplace(Settings->GetPlatformName()).Append(CastChecked<UAutomationTestExcludelistSettings>(Settings)->SupportedRHIs);
			}
		}

		return PlatformSettings.FindOrAdd(Platform);
	}