Commit Graph

40 Commits

Author SHA1 Message Date
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
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
arciel rekman
696bb40a51 Improvements to material editor responsiveness with stats open.
- Count SM finalization time into the time budget to prevent super long ticks.
- Make material stats panel update no more frequently than once in 5 seconds.

#rb Ben.Ingram
[at]Ben.Ingram
#jira none

#ROBOMERGE-SOURCE: CL 16333791 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16333803 by arciel rekman in ue5-release-engine-test branch]
2021-05-14 15:43:08 -04:00
Lauren Barnes
39f1923ed0 Deprecating .Icon() as a slate attribute on SDockTab. By default, tab icons fall back to using the one for the tab spawner's menu item. SetTabIcon can be used in the edge cases where an icon needs to be set that doesn't match the default. Updating all found cases of .Icon() usage on SDockTab.
#jira UETOOL-3429
#preflight 60996a2bdd2e00000126ff25
#rb Matt.Kuhlenschmidt

[CL 16251489 by Lauren Barnes in ue5-main branch]
2021-05-10 14:19:15 -04:00
Jeremy Moore
38a0ccdec5 Fix null vertex factory dereference when building list of shaders for material shader code windows.
#jira none
#rb none

[CL 15953790 by Jeremy Moore in ue5-main branch]
2021-04-08 09:10:47 -04:00
jeremy moore
9f15bb1258 #jira UE-112934
Handle null vertex factory in stats collection.
#rb jason.nadro
#lockdown kevin.ortegren

#ROBOMERGE-SOURCE: CL 15942493 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)

[CL 15944995 by jeremy moore in ue5-main branch]
2021-04-07 15:29:33 -04:00
lauren barnes
3553779a26 Material and Material Instance editors update v1.0
#jira UETOOL-2624
#jira UETOOL-2623
#rb Louise.Rasmussen

#ROBOMERGE-SOURCE: CL 15528734 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15528756 by lauren barnes in ue5-main branch]
2021-02-25 11:30:03 -04:00
Marc Audy
cac1fe0019 Merge UE5/Release-Engine-Staging @ CL# 15299266 to UE5/Main
This represents UE4/Main @ CL# 15277572

[CL 15299962 by Marc Audy in ue5-main branch]
2021-02-03 14:57:28 -04:00
Arciel Rekman
ce1357b902 Fix crash accessing platform stats (UE-104965)
- Same issue as FORT-334737: platform extension may be present, but haven't been properly initialized.

(Edigrating CL 14858266).

#rb Josh.Adams (in previous branch)
#jira UE-104965
#fyi Kevin.Ortegren

[CL 14991301 by Arciel Rekman in ue5-main branch]
2021-01-05 11:25:26 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
christopher waters
dbb4152ba8 Fixing shader source showing 'duplicate' entries. The shader lookups were only using the shader type name and not considering that they are unique per vertex factory.
#rb Arciel.Rekman, Lukas.Hermanns
#jira none

[CL 14423308 by christopher waters in ue5-main branch]
2020-10-05 14:47:30 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
david harvey
1eda607b2c add platform extension shader formats to material editor stats
#rb josh.adams
#jira none
#lockdown marcus.wassmer

#ROBOMERGE-SOURCE: CL 12653863 in //UE4/Release-4.25Plus/... via CL 12653865
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12653868 by david harvey in Main branch]
2020-04-07 10:52:06 -04:00