It is possible to use the -sandbox= option to mount an alternative file system location from which to load data. On desktop platforms, if the -sandbox= is not specified then Saved/Cooked/[Platform] is implicitly created as a sandbox. This allows runtime binaries to run off cooked data and negate the need to stage. When cooking, the Metal shader compiler creates shader libraries with files in title case. UAT will convert these into lowercase when staging. The Metal RHI is unable to load the cooked libraries as it assumes it is loading lowercase ones from staged data. This change makes sure that all shader libraries are always lowercase. Secondly, the paths to .metallib files where preprocessed in a such a way that bypassed the sandbox file system, resulting in an incorrect native path. Now the API used to convert from IPlatformFile paths to native ones is always used such that sandboxing will get taken into account.
#jira UE-133202
#rnx
#rb will.damon
#preflight 61e7d989f517d721f993c82f
[CL 18656074 by Martin Ridgers in ue5-main branch]
The target info reported when running `xcrun --sdk <platform> metal -v' is always the default for the running OS, and may vary slightly between point releases. Specifying the target reduces the chances of mismatched shader version when using FASTBuild to compile shaders.
NOTE: In order for the shader version to match, the FASTBuild workers must (currently) have the same version Xcode installed, but do not necessarily need to be running the same OS version.
#rb trivial
#[fyi] richard.wallis
#rnx
#robomerge[STARSHIP] Release-5.0-EarlyAccess
#ushell-cherrypick of 15734101 by will.damon
[CL 15739001 by will damon in ue5-main branch]
#rb lukas.hermanns
#jira none
#rnx
#lockdown marcus.wassmer
#ushell-cherrypick of 15389786 by will.damon
#ROBOMERGE-SOURCE: CL 15381462 in //UE4/Release-4.26/... via CL 15387405 via CL 15389663 via CL 15392606
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15392611 by will damon in ue5-main branch]
#jira UE-89933
#rb carl.lloyd
#ROBOMERGE-SOURCE: CL 11894021 in //UE4/Release-4.25/... via CL 11894022
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 11894024 by wei liu in Main branch]
#rnx
#rb none
#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870584 by ryan durand in Main branch]
Maybe workaround another Apple/AMD internal compiler error - the safe_array code was causing the AMD driver compiler to fail but simplifying the code seems to work. May have unintended consequences on iOS.
#rb none
#jira UE-72812
[CL 5923534 by Mark Satterthwaite in Main branch]
Package Metal shader source into a zip file rather than a tgz so it can be done on Windows builds too and do this asynchronously while generating the Metal libraries. This file is stored in the MetaData folder so should be moved out of the content and not get packaged. Must be unzipped at the command-line for some reason, but it works.
#rb none
#ROBOMERGE-SOURCE: CL 5333983
[CL 5333997 by mark satterthwaite in Main branch]