UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IOSPlatformDynamicRHI.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5
6//------------------------------------------------------------------------------
7// MARK: - iOS/tvOS Platform Dynamic RHI Defines
8//
9
10
11//------------------------------------------------------------------------------
12// NOTE: Unreal Engine uses the same headers for iOS and tvOS; consequenty, we
13// use PLATFORM defines in this _rare_ instance to differentiate shader
14// platform types.
15//------------------------------------------------------------------------------
16
17
18#if PLATFORM_TVOS
19#define SHADER_PLATFORM_METAL_SM5 SP_METAL_SM5_TVOS
20#define SHADER_PLATFORM_METAL_ES3_1 SP_METAL_ES3_1_TVOS
21#elif WITH_IOS_SIMULATOR
22#define SHADER_PLATFORM_METAL_ES3_1 SP_METAL_SIM
23#define SHADER_PLATFORM_METAL_SM5 SP_METAL_SM5_IOS
24#else
25#define SHADER_PLATFORM_METAL_SM5 SP_METAL_SM5_IOS
26#define SHADER_PLATFORM_METAL_ES3_1 SP_METAL_ES3_1_IOS
27#endif
28
29//------------------------------------------------------------------------------
30// MARK: - iOS/tvOS Platform Dynamic RHI Routines
31//
32
33namespace UE
34{
35namespace FIOSPlatformDynamicRHI
36{
37
42
44{
45 bool bSupportsMetalMRT = false;
46 GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsMetalMRT"), bSupportsMetalMRT, GEngineIni);
47 return (bSupportsMetalMRT || FParse::Param(FCommandLine::Get(), TEXT("metalmrt"))) && !ShouldPreferFeatureLevelES31();
48}
49
58
59} // namespace FIOSPlatformDynamicRHI
60} // namespace UE
61
#define FORCEINLINE
Definition AndroidPlatform.h:140
FString GEngineIni
Definition CoreGlobals.cpp:237
FConfigCacheIni * GConfig
Definition CoreGlobals.cpp:54
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define SHADER_PLATFORM_METAL_SM5
Definition IOSPlatformDynamicRHI.h:25
#define SHADER_PLATFORM_METAL_ES3_1
Definition IOSPlatformDynamicRHI.h:26
FName LegacyShaderPlatformToShaderFormat(EShaderPlatform Platform)
Definition RHIStrings.cpp:237
CORE_API bool GetBool(const TCHAR *Section, const TCHAR *Key, bool &Value, const FString &Filename)
Definition ConfigCacheIni.cpp:5154
Definition Array.h:670
Definition IOSPlatformDynamicRHI.h:36
bool ShouldPreferFeatureLevelES31()
Definition IOSPlatformDynamicRHI.h:38
FORCEINLINE bool ShouldSupportMetalMRT()
Definition IOSPlatformDynamicRHI.h:43
void AddTargetedShaderFormats(TArray< FString > &TargetedShaderFormats)
Definition IOSPlatformDynamicRHI.h:50
Definition MacPlatformDynamicRHI.h:13
Definition AdvancedWidgetsModule.cpp:13
static CORE_API const TCHAR * Get()
Definition CommandLine.cpp:61
static CORE_API bool Param(const TCHAR *Stream, const TCHAR *Param)
Definition Parse.cpp:325