Commit Graph

34 Commits

Author SHA1 Message Date
arciel rekman
2c4fba02af Fix hitching while precompiling PSO cache.
- Add a new API to release preloaded shader to provide a way to manage preloaded data (which was previously statically allocated).

#rb James.Doverspike, Richard.Wallis
[REVIEW] [at]Allan.Bentham, [at]Richard.Wallis
#preflight 625e11c4db15ac92db7ee858

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19832275 via CL 19833640 via CL 19837454 via CL 19854946 via CL 19855339
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19856713 by arciel rekman in ue5-main branch]
2022-04-21 17:47:12 -04:00
arciel rekman
1c4d80a2ff Chunk PSO cache during the cook (FORT-443978).
- "Build" command of the PSO commandlet will split the cache, generating separate files for each chunk.
- Criterion is whether any shaders of the PSO can be used by the assets in that chunk (including after deduplication).
- Disabled by default because the runtime part to pick up those files isn't in yet.

#rb Allan.Bentham, Dmytro.Vovk
[REVIEW] [at]Allan.Bentham, [at]Pete.Sauerbrei, [at]Chris.Genova, [at]James.Doverspike, [at]Kenzo.TerElst, [at]Dmytro.Vovk
#preflight 62448dc2e434babd8ae73354

#ROBOMERGE-OWNER: arciel.rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19563493 via CL 19563649 via CL 19563674
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19565457 by arciel rekman in ue5-main branch]
2022-03-30 18:20:37 -04:00
carlmagnus nordin
341637ba37 IoStore: Changes to allow IoStore to run as part of UnrealPak instead of as a cmdlet
#rb per.larsson
#rnx

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17517167 via CL 17517189 via CL 17517191 via CL 17519703 via CL 17519714
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v870-17433530)

[CL 17519729 by carlmagnus nordin in ue5-main branch]
2021-09-15 10:40:05 -04:00
CarlMagnus Nordin
f21e594dd0 Added support for storing shaders in iostore.
Opt-In with core setting AllowShadersInIoStore
#review-16450322

[CL 16622428 by CarlMagnus Nordin in ue5-main branch]
2021-06-10 09:29:05 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
christopher waters
83f70197d3 Tessellation Removal: Removing RHI Hull/Domain shader types and enums.
#rb lukas.hermanns
#jira UE-94564
#preflight 607f2e11eb4f050001d4655e

[CL 16066223 by christopher waters in ue5-main branch]
2021-04-20 17:00:25 -04:00
christopher waters
edf90e8d4a Adding mesh shader support to pipeline caches.
- Pipeline caches had serialization code for the new types but wasn't creating the shaders on preload
- Fixing the cache commandlet to be flexible with the supported shader types.

#jira none
#rb jason.nadro, arciel.rekman

[CL 15801914 by christopher waters in ue5-main branch]
2021-03-24 12:45:47 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
Marc Audy
ada7c144fa Merge //UE5/Release-Engine-Staging @14903491 to //UE5/Main
[CL 14906022 by Marc Audy in ue5-main branch]
2020-12-11 14:21:20 -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
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
ben ingram
d9d0535ddc Add freezable hash table, use to accelerate lookup of shaders within ShaderMap
- Shaders are searched by TypeName and PermutationId, so move those fields out of FShader and into separate arrays inside ShaderMap, to reduce cache misses while finding shaders
#rb none

#ROBOMERGE-OWNER: ben.ingram
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 12646854 via CL 12646966 via CL 12646981
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12646995 by ben ingram in Main branch]
2020-04-06 21:12:18 -04:00
Arciel Rekman
e970ef5ea2 ShaderLibrary sorted by file open order, with other fixes (FORT-265600).
- Each shadermap is now associated with one or more assets, and shaders are laid out according to the
  open order of those assets, if provided. If not provided, the original ordering is kept. The original ordering
  will not be always deterministic, particularly if shader compilation needs to happen, because jobs can get
  reordered during the compilation.

Other fixes:

- Fixed sorting within the shadermap not being deterministic (FCompareShaderPrimaryKey)
- Fixed Niagara shadermap duplicating Platform property and not initializing it properly.
- Removed (unused) support for Child shader libraries (would not be deterministic).

#rb Ben.Ingram, Rob.Krajcarski


#ROBOMERGE-OWNER: Arciel.Rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 12249260 via CL 12249262 via CL 12250173
#ROBOMERGE-BOT: (v668-12245121)

[CL 12250313 by Arciel Rekman in Main branch]
2020-03-18 15:35:20 -04:00
devin doucette
0174be282a Added and used StringFwd.h for string builder and string view declarations
Including StringFwd.h in place of forward declarations offers more flexibility to change how these types are declared.

#jira none
#rb Steve.Robb
[RN] minor Core

#ROBOMERGE-SOURCE: CL 12235779 in //UE4/Release-4.25/... via CL 12235792
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v664-12234175)

[CL 12237495 by devin doucette in Main branch]
2020-03-17 20:03:03 -04:00
Arciel Rekman
f6b2c6df54 Make shader library determinism optional per platform.
#rb Josh.Adams, Ben.Woodhouse
#rnx


#ROBOMERGE-OWNER: Arciel.Rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 11450810 via CL 11452365 via CL 11452390 via CL 11452432
#ROBOMERGE-BOT: (v654-11333218)

[CL 11456136 by Arciel Rekman in Main branch]
2020-02-15 10:16:44 -05:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
devin doucette
6eec62bcf6 Optimize ShaderPipelineCacheToolsCommandlet
- Optimize parsing of FVertexElement, FDepthStencilStateInitializerRHI, FBlendStateInitializerRHI, FPipelineFileCacheRasterizerState, FPipelineCacheFileFormatPSO using FStringView and TArray<FStringView, TInlineAllocator<N>> to avoid temporary allocations.
- Optimize parsing and string conversion of FCompactFullName, FStableShaderKeyAndValue using FStringView and T[Ansi]StringBuilder to avoid temporary allocations.
- Use TInlineAllocator<16> for FCompactFullName to eliminate dynamic allocations. The size was selected by profiling a title with many shaders.
- Serialize FEditorShaderStableInfo directly to UTF-8 instead of converting to it later to avoid converting every name from ASCII to UTF-16 to UTF-8 during the serialization process.
- Load input files in parallel now that millions of allocations have been eliminated.
- Make the PSOSC serialization self-test only run when verbose logging is enabled.
- Optimize ParseQuoteComma by using FStringView and TArray<FStringView, TInlineAllocator<N>> to avoid temporary allocations.

These changes reduced the execution time of the build command by 90% on a large title. The time savings affect full, iterative, and single-package cooks.

#rb Arciel Rekman, Zousar.Shaker

#ushell-cherrypick of 10860101 by devin.doucette


#ROBOMERGE-SOURCE: CL 11163162 via CL 11163163 via CL 11163164
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166858 by devin doucette in Main branch]
2020-01-29 15:15:45 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
arciel rekman
324add1e80 Support shader pipelines in the shader code library's stable map.
- Added shader pipeline hash as a key attribute.
- Added shaders from shader pipelines (they can have different code if RHI removes unused interpolators between the stages, like D3D does).

#rb Dmitriy.Dyomin, Richard.Wallis


#ROBOMERGE-SOURCE: CL 9959336 via CL 9959339 via CL 9959342
#ROBOMERGE-BOT: (v558-9892490)

[CL 9959347 by arciel rekman in Main branch]
2019-11-01 12:56:00 -04:00
yuriy odonnell
3e4eb41ade Added support for creating ray tracing shaders through FShaderCodeLibrary
#rb Luke.Thatcher
#jira none

#ROBOMERGE-SOURCE: CL 9730989 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v539-9700858)

[CL 9730990 by yuriy odonnell in Main branch]
2019-10-21 07:50:05 -04:00
Marcus Wassmer
6517c68ef5 Copying //UE4/Dev-RenderPlat-Staging@8684824 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 8684840 by Marcus Wassmer in Main branch]
2019-09-14 09:45:25 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
johan berg
45fe0d7d31 Generating stable shader info is now configurable.
Shader code library was always emitting "<shadermodel>.scl.csv" files while cooking. This output data is only needed for users (or automated jobs) that update the PSO cache. With this change the configuration value "NeedsShaderStableKeys" needs to be set to true for platforms that use PSO (e.g. AndroidEngine.ini and  IOSEngine.ini).

This saves diskspace and around 90 seconds on a iterative cook on a large project.

#rb Dmitriy.Dyomin


#ROBOMERGE-SOURCE: CL 6604300 via CL 6604799
#ROBOMERGE-BOT: (v351-6581450)

[CL 6604833 by johan berg in Main branch]
2019-05-22 10:28:16 -04:00
mark satterthwaite
1eebce443b Initial work to support creating additive 'patch' shader libraries from the metadata of two different cooked builds.
#rb none


#ROBOMERGE-SOURCE: CL 5929239 via CL 5933291

[CL 5933354 by mark satterthwaite in Main branch]
2019-04-16 19:30:02 -04:00