54 Commits

Author SHA1 Message Date
dmytro ivanov
779e0059c5 Fixing material editor crash when trying to restore previously open shader code tab before shader instances are populated
#jira UE-209144
#rb Patrick.Boutot

[CL 32499440 by dmytro ivanov in 5.4 branch]
2024-03-26 02:23:09 -04:00
dmytro ivanov
41384ca36a Fixing assert in memory stats
#rb Jack.Porter

[CL 30782381 by dmytro ivanov in ue5-main branch]
2024-01-22 14:16:15 -05:00
dmytro ivanov
8287cf4cdb Option to force always compiling materials for mobile in material editor
#rb Jack.Porter

[CL 30660119 by dmytro ivanov in ue5-main branch]
2024-01-17 11:31:40 -05:00
dmytro ivanov
9dba280cc1 Show material hierarchy in platform stats and warn if derived material instances fail to compile
#rb Jack.Porter

[CL 27909604 by dmytro ivanov in ue5-main branch]
2023-09-15 05:04:46 -04:00
dmytro ivanov
357a88fefe Enable mobile platform stats by default
#rb Dmitriy.Dyomin

[CL 27585397 by dmytro ivanov in ue5-main branch]
2023-09-04 09:10:08 -04:00
adam kinge
43d42d6d2b Required Metal changes to support iOS Simulator.
- 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]
2023-08-04 12:28:20 -04:00
carl lloyd
a793c2fcd1 Add support to enable an SM6 platform for Mac
#rb Zack.Neyland
#jira UE-184435

[CL 26062749 by carl lloyd in ue5-main branch]
2023-06-16 14:24:06 -04:00
christopher waters
5b751e83bd Cleaning up more platform code.
#jira UE-185135
#rb robert.srinivasiah
#preflight 64628533aa3c584c0b0af08d

[CL 25480257 by christopher waters in ue5-main branch]
2023-05-15 16:56:55 -04:00
Florin Pascu
cd8651734e UX: Remove user-visible ES31 editor references and replace with Mobile
#jira UE-134173
#rb Jack.Porter
#preflight 6447ac2e641e2c3cb4227930

[CL 25178065 by Florin Pascu in ue5-main branch]
2023-04-25 07:05:08 -04:00
jeannoe morissette
75364b7008 VulkanRHI: Add VULKAN_SM6. Move features and requirements around to match what was done on d3d.
#rb arciel.rekman, carl.lloyd
#preflight 643996128901e5ef982dc887

[CL 25045731 by jeannoe morissette in ue5-main branch]
2023-04-14 14:26:06 -04:00
christopher waters
6e30ddb01e Dependency cleanup around DataDrivenShaderPlatformInfo and a few other headers.
#preflight 63921e6a67018b14b5925197

[CL 23454104 by christopher waters in ue5-main branch]
2022-12-08 15:35:35 -05:00
steve robb
125fd0084e Removed explicit template parameters from calls to delegate creation functions.
#rb devin.doucette
#preflight 636416e31052c15f139cbadc

[CL 22968432 by steve robb in ue5-main branch]
2022-11-03 18:01:03 -04:00
dan elksnitis
659ef98d9d [materials]
- 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]
2022-10-11 10:06:40 -04:00
bryan sefcik
b93a6cf7ed Pass 1 on editor include fixes:
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]
2022-09-11 18:33:06 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
Jason Nadro
7e37e4cc2e Cooked platform ODSC. Only compile the shaders that are rendered with and not complete shader maps for every cooked material.
# 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]
2022-04-22 09:11:18 -04:00
Jason Nadro
5fd98b2f41 Warn the user if there are material errors when calling CacheGivenTypes().
- 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]
2022-03-28 11:37:18 -04:00
Jason Nadro
b914ef3c2f Only compile the shaders needed to gather shader platform stats in the Material Editor.
# 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]
2022-03-23 13:03:01 -04:00
ben ingram
526e6a4ae0 Don't create material stats in editor for invalid shader platforms
#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]
2022-03-22 23:24:21 -04:00
robert srinivasiah
3737a45475 Hololens: Dedicated Shader Platform
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]
2022-02-02 08:00:15 -05:00
arciel rekman
616fdffde0 Fix CIS (MaterialStats.cpp, deprecated SP removed).
#rb none
#jira none
#preflight none

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18485162 in //UE5/Release-5.0/... via CL 18485165
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18485167 by arciel rekman in ue5-release-engine-test branch]
2021-12-17 14:54:41 -05:00
arciel rekman
b65ed306c1 Fix shaders stats not showing up on Mac (UE-134608).
#jira UE-134608
#rb Will.Damon
#lockdown Cristina.Riveron
[REVIEW] [at]Mitchell.Wilson

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18173938 in //UE4/Release-4.27/... via CL 18458421 via CL 18458609 via CL 18485099 via CL 18485103
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18485112 by arciel rekman in ue5-release-engine-test branch]
2021-12-17 14:43:29 -05:00
arciel rekman
1e5deb1942 Improve availability of shader platforms in the mat ed (UE-136509).
#rb none
#jira UE-136509

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18387134 in //UE5/Release-5.0/... via CL 18387149
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18387152 by arciel rekman in ue5-release-engine-test branch]
2021-12-06 15:33:50 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
kevin ortegren
7bf79cbec3 [Backout] - CL17887288
[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]
2021-10-26 14:27:07 -04:00