Commit Graph

41 Commits

Author SHA1 Message Date
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
arciel rekman
650c7ce628 Resubmitting: stabilize the order of shaders in the shader library (FORT-255406)
- Previously the order of shaders would be defined by the order of adding them, which can vary even without any change due to SCWs finishing the jobs at a different time.
- Fixed a previous compile issue and added comments re: TSortedMap and TMap compatibility after checking with the Core team.

#rb Daniel.Lamb (discussed)
[CODEREVIEW] Dmitriy.Dyomin


#ROBOMERGE-SOURCE: CL 11248093 via CL 11248095 via CL 11248101
#ROBOMERGE-BOT: (v647-11244347)

[CL 11254818 by arciel rekman in Main branch]
2020-02-05 12:49:12 -05:00
bob tellez
0fa930ad38 Back out changelist 11224248. CIS error
[FYI] Arciel.Rekman


#ROBOMERGE-SOURCE: CL 11225960 via CL 11228025 via CL 11228838
#ROBOMERGE-BOT: (v644-11213502)

[CL 11241725 by bob tellez in Main branch]
2020-02-04 22:32:52 -05:00
arciel rekman
77f933e4ce Stabilize the order of shaders in the shader library (FORT-255406).
- Previously the order of shaders would be defined by the order of adding them, which can vary even without any change due to SCWs finishing the jobs at a different time.

#rb Daniel.Lamb (discussed)
[CODEREVIEW] Dmitriy.Dyomin


#ROBOMERGE-SOURCE: CL 11224248 via CL 11227707 via CL 11228378
#ROBOMERGE-BOT: (v644-11213502)

[CL 11241606 by arciel rekman in Main branch]
2020-02-04 22:30:44 -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
chris bunner
71500ad073 Fixing up header in shadercode library CSV, previously the first entry would append to the same line and result in "OutputHashempty" as a header field. Standard line break appended to correct.
[REVIEW] Ben.Salem, Richard.Wallis


#ROBOMERGE-SOURCE: CL 9868558 via CL 9868562 via CL 9868563
#ROBOMERGE-BOT: (v548-9842178)

[CL 9868569 by chris bunner in Main branch]
2019-10-28 09:28:29 -04:00
rolando caloca
e521bb5ed4 Delete Library file handle on close (Non native ShaderCodeLibrary implementation only), unfortunatly this also means we have to wait on any outstanding read tasks.
Plus - Fix rare shutdown check() failure when async file reads are still wainting in the FShaderPipelineCache.

Plus - Put back correct order of shutdown for FShaderCodeLibrary and FShaderPipelineCache as they can have outstanding aync file handles and we'll get a crash if they are closed after the module shutdown has deleted the FPakPrecacher singleton.

#jira UE-79315
#rb Dmitriy.Dyomin, Michael.Trepka
[FYI] Michael.Trepka
#fyi Richard.Wallis

#ROBOMERGE-OWNER: rolando.caloca
#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 9743659 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v542-9736015)

[CL 9744080 by rolando caloca in Main branch]
2019-10-22 08:30:35 -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
Rolando Caloca
f83ae4807a Copying //UE4/Dev-Rendering@9317594 to Dev-RenderPlat-Staging
#rb none
#rnx

[CL 9317904 by Rolando Caloca in Dev-RenderPlat-Staging branch]
2019-10-01 13:03:04 -04:00
ben marsh
781fa83d9a FShaderCodeLibrary - Editor fixes. It's up to the caller if we want to initialize the code library - if we have an implementation then allow shader creation. Impl creation was checked against FPlatformProperties::RequiresCookedData() but its a bit more complex than that. Logic for creation is in LaunchEngineLoop.cpp.
#jira
[FYI] Richard.Wallis
#rb none
#rnx

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 9098039 via CL 9098044
#ROBOMERGE-BOT: (v443-9013191)

[CL 9100475 by ben marsh in Main branch]
2019-09-25 14:29:32 -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
dan phillips
f93da41718 platform specific code clean up.
[FYI] ben.woodhouse


#ROBOMERGE-SOURCE: CL 8243883 via CL 8244021
#ROBOMERGE-BOT: (v401-8057353)

[CL 8244067 by dan phillips in Main branch]
2019-08-23 23:22:34 -04:00
dan phillips
6f369e9c3e XboxOne shader libraries are seperated into their own pak files, each one with it's own cache.
[FYI] ben.woodhouse


#ROBOMERGE-SOURCE: CL 8030189 via CL 8041682
#ROBOMERGE-BOT: (v400-8057353)

[CL 8062576 by dan phillips in Main branch]
2019-08-15 13:51:39 -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
michael trepka
d0529f3c65 Modified error handling code in ShaderCodeLibrary to display a message box telling players the game files are missing instead of crashing with fatal UE_LOG message.
#rb Chris.Bunner


#ROBOMERGE-SOURCE: CL 6446280 via CL 6446292 via CL 6447699

[CL 6447733 by michael trepka in Main branch]
2019-05-14 11:36:00 -04:00
ben woodhouse
644e6136c2 Add cvar to set IO priority for shader code library reads: r.ShaderCodeLibrary.DefaultAsyncIOPriority. Sometimes they are thrashing during uobject reads and causing seeks.
Setting is unchanged for now
[FYI] gil.gribb


#ROBOMERGE-SOURCE: CL 6417507 via CL 6418864 via CL 6418876 via CL 6418960

[CL 6418983 by ben woodhouse in Main branch]
2019-05-11 05:52:15 -04:00
peter sauerbrei
8a68393339 potential fix for PSO problems
#rb gil.gribb


#ROBOMERGE-SOURCE: CL 6195143 via CL 6195202 via CL 6196410

[CL 6196455 by peter sauerbrei in Main branch]
2019-05-01 17:01:12 -04:00
arciel rekman
666cb97676 Shader Library: use proper shader format names (UE-72416).
- Vulkan (and GL) can have variant names like _NOUB.

#rb Dmitriy.Dyomin
#jira UE-72416
[FYI] Marcin.Undak, Brandon.Schaefer
#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 6011769 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 6011770 by arciel rekman in Main branch]
2019-04-19 09:03:39 -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
richard wallis
cd9c18700f Remove the error log (logging still reports internally) and report result back to higher level for it to decide if this is an error - we can not know at the engine level. Soften the language of some of the other internal fail messages to steer the thinking away from errors and more informational.
#rb michael.trepka


#ROBOMERGE-SOURCE: CL 5916504 via CL 5916508 via CL 5917359

[CL 5917425 by richard wallis in Main branch]
2019-04-16 11:54:47 -04:00
pj kack
da2a5e3d66 Back out integrated changelist 5586728 (5571078) to resubmit all cook -iterate optimizations implemented on //UE4/Dev-core/... (see 5533504)
New AssetRegistryState::InitializeFromExistingAndPrune temporarily disabled until some bugs have been fixed.

Test Scenario:
1) BuildCookStageAndRun with these arguments: -platform=Win64 -configuration=Development
2) CookIterate with these arguments: -run=Cook -CookCultures=en -TargetPlatform=WindowsClient -unversioned -stdout -unattended -iterate

Wall Time Results (as an average of running step 2) two times):
Before: ~09:40 (580 seconds) cook commandlet time
After: ~02:30 (150 seconds) cook commandlet time
=> 07:10 (430 seconds ) faster, i.e. a ~ 3.9x speedup

Win32 FileSystem Results:
Before: 1.5 million GetFileAttribute calls and 1.2 million FindNextFile calls
After: 35 0000 GetFileAttribute calls and 1.6 million FindNextFile calls
=> ~400 000 calls to FindNextFile replaces ~1.5 million calls to GetFileAttribute

#rb none


(peafour-cherrypick of //UE4/Dev-Core/[at]5645695 by PJ.Kack)


#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 5533504 via CL 5533655 via CL 5536177 via CL 5772728 via CL 5772753

[CL 5772793 by pj kack in Main branch]
2019-04-08 01:19:56 -04:00
bob tellez
0ae7f9c6dd Back out changelist 5533504. Crash at startup on forking linux servers. (Missing referencer information)
#ROBOMERGE-SOURCE: CL 5571078 via CL 5572105

[CL 5572109 by bob tellez in Main branch]
2019-03-26 20:30:52 -04:00