- add a new shader platform (SP_METAL_SIM) to support iOS Simulator specific compilation requirements
- update iOS sim #define WITH_SIMULATOR to WITH_IOS_SIMULATOR
#jira UE-168571
#rb carl.lloyd
[CL 26850475 by adam kinge in ue5-main branch]
- fix non-determinism in material shader map; correctly account for permutation ID in keys when storing preprocessed source and deduplicate.
- fix material stats source lookup not accounting for permutation IDs and deprecate old API
- fix material stats searching for an invalid key in the case where vertex factory is null
- change material logging to construct & output the same hash as DDC, the FSHA1 hashed keys don't match
- change LogMaterial channel to allow VeryVerbose messages
- add VeryVerbose logging of the unhashed (i.e. human-readable) DDC key for material shader maps
- add a debug utility driven via cvar to output the textual representation of shader maps for a given named material to disk (was key in tracking down the non-determinism mentioned above)
#jira UE-150069
#preflight 634571214a5cc23dd6d8d9a5
#rb Jason.Nadro
#rb Yuriy.ODonnell
[CL 22457384 by dan elksnitis in ue5-main branch]
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.
#jira
#preflight 631e283bec5b0c765fc0ffdb
[CL 21960084 by bryan sefcik in ue5-main branch]
# Results
- In my small tests this resulted in compiling 8.9x less shaders (1558 vs. 174)
- Spent 107 seconds less compiling.
# Changes
- Adds CacheGivenTypesForCooking to UMaterialInterface and implemented for UMaterial and UMaterialInstance. This is responsible for compiling just the given types of shaders which is fully qualified by VF Type, Shader Type (or Shader Pipeline Type).
- Fully qualify each shader compile request from the client by FeatureLevel and QualityLevel. This way we don't compile multiple quality levels that aren't actively rendered with.
- CacheGivenTypesForCooking for UMaterial and UMaterialInterface explicity tries to re-use and find existing resources so we can progressively build up the shadermap while running.
- FMaterial::CacheGivenTypes now can compile shader pipelines.
- Adds CompileODSCMaterialsForRemoteRecompile which compiles just the requested shaders. This was because I wanted to leave the functionality in CompileMaterialsForRemoteRecompile alone.
- FShaderRecompileData now has a serialize function so the Load/Save serialize code can be the same on host and client.
- Made CompileMaterialsForRemoteRecompile compiled only for the Editor.
- Don't assert on needing complete shader maps when using ODSC.
- Mass conversion from NULL to nullptr in ShaderCompiler.cpp
- Refactoring some common code from RecompileShadersForRemote into separate functions.
#rb Ben.Ingram
#jira UE-136438
#preflight 6261bb9afe26b98ad8479633
[CL 19863961 by Jason Nadro in ue5-main branch]
- Prevent CacheGivenTypes from being called if material compilation fails when generating platform stats.
#rb Sebastien.Hillaire
#preflight none
[CL 19528276 by Jason Nadro in ue5-main branch]
# Results
Modfiying WorldGridMaterial with two platforms open in platform stats.
- We compile a fixed number of shaders (less than 10 per platform) now instead of the 1078 shaders (per platform) w/ WorldGridMaterial.
- On average ProcessCompiledShaderMaps is 40x faster. (1727ms vs. 43ms)
- In the worst cast ProcessCompiledShaderMaps is 10.9x faster. (4865ms vs 445ms)
- The material editor in this scenario goes from unusable to useable.
# Changes
- Add `FMaterial::CacheGivenTypes` to compile just the shader types given to it.
- Call `GetRepresentativeShaderTypesAndDescriptions` to gather the shader types we care about and only submit jobs to compile those shaders when generating platform stats.
- Since we are no longer compile a complete shader map the ShaderCount is incorrect. Now we call `GetShaderTypes` of the `FMaterialResource` to gather the number of shaders in the material. This function doesn't trigger shader compilation which is important.
- Adding const to the following functions:
- FMaterial::GetShaderTypesForLayout
- FMaterial::GetShaderTypes
- FMaterial::GetShaderTypes is now ENGINE_API so we can call it from the Material Editor.
- Add `TBasePassPSFCachedVolumeIndirectLightingPolicy` shader type to FMaterialStatsUtils::GetRepresentativeShaderTypesAndDescriptions. This shader has the worst case sampler count. This ensures we compile this shader and are able to query the worst case sampler count for the platform stats. This is very ad-hoc, and could be improved in the future.
#rb Ben.Ingram
#jira UE-138623
#preflight 623b4e4cc3399da9533282cc
[CL 19481265 by Jason Nadro in ue5-main branch]
#rb none
#preflight none
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 19458597 via CL 19460034 via CL 19463251 via CL 19475219 via CL 19475280
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v935-19464907)
[CL 19475939 by ben ingram in ue5-main branch]
We can't share DDPI infrastructure with PC D3D ES3.1 because of conflicts from sharing. We need a separate shader platform.
For now, we'll just 'intrusively' plumb the new Hololens shader platform. In the future, we want to move as much code out into
Hololens-specific platform code to reduce conflict with shared paths that don't need to know about Hololens.
#rb steve.smith, christopher.waters
#jira UE-133375
#preflight 61f9ca302251c6fb596e583e
#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 18818524 in //UE5/Release-5.0/... via CL 18818546 via CL 18822881
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18824735 by robert srinivasiah in ue5-main branch]
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971
[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
[FYI] Ben.Ingram
#jira UE-132661
Original CL Desc
-----------------------------------------------------------------
Generate cached data for MID created at runtime in non-editor builds
Make sure material instance resources are updated from cached data loaded in non-editor builds
#jira UE-131802
#rb none
#ROBOMERGE-OWNER: aurel.cordonnier
#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-COMMAND: _robomerge UE5-Release-Engine-Test
#ROBOMERGE-SOURCE: CL 17921250 in //UE5/Release-5.0/... via CL 17922774
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
[CL 17930569 by kevin ortegren in ue5-release-engine-test branch]