Commit Graph

136 Commits

Author SHA1 Message Date
Matt Peters
e88035918f ShaderLibrary: Logging: Restore LogShaderLibrary stat messages to Display because some farm jobs only capture stdout.
#rb None, trivial
#rnx

[CL 26513514 by Matt Peters in ue5-main branch]
2023-07-21 11:30:30 -04:00
Matt Peters
bd4c3442f6 ShaderLibrary: Logging: Downgrade LogShaderLibrary stat messages to Log to make it easier to scan the display output of cooking.
#rnx
#b Jason.Nadro

[CL 26483347 by Matt Peters in ue5-main branch]
2023-07-20 08:26:32 -04:00
joe pribele
f5481ce835 changed FShaderCodeLibraryPluginUnmountedCallback to close the shader library at the end of the render pipeline
#preflight 646cf60a1b241f0748ae995d
https://p4-swarm.epicgames.net/reviews/25511457
#rb justin.marcus

[CL 25592363 by joe pribele in ue5-main branch]
2023-05-23 18:16:09 -04:00
Matt Peters
a40b62a8f9 MPCook ShaderLibrary replication: add a maximum size for shader data in CopyToCompactBinaryAndClear to avoid overflowing the maximum size per message.
#jira UE-179094
#rnx
#rb Laura.Hermanns
#preflight 6452b19e6538e45f75c990e5

[CL 25324819 by Matt Peters in ue5-main branch]
2023-05-03 16:14:10 -04:00
arciel rekman
2b8a5076d4 Add owner name to the ensure reporting leaked SM resources as well.
#rb none
#preflight 642f106f6d46f6b1bfab1bf7

[CL 24961464 by arciel rekman in ue5-main branch]
2023-04-06 21:11:16 -04:00
Andriy Tylychko
7b5ca318e0 deprecated FCoreDelegates::OnPakFileMounted2 because it's thread-safe but is used concurrently. Added a thread-safe version FCoreDelegates::GetOnPakFileMounted2() and switched all use cases to the new one
#rb francis.hurteau
#preflight 641d99d214423a492d30c75a

[CL 24778298 by Andriy Tylychko in ue5-main branch]
2023-03-24 08:57:53 -04:00
Matt Peters
0027082473 RequestExit Feedback: Add Callsite argument to FPlatformMisc::RequestExit
Add the argument to many but not all callsites.
#jira FORT-578919
#rnx
#rb Devin.Doucette
#preflight 6414ca9d691c5ebc15b30410

[CL 24696053 by Matt Peters in ue5-main branch]
2023-03-17 16:46:34 -04:00
arciel rekman
1ffb07bd99 Do not produce empty output stable shader key.
#rb none
#rnx
#preflight 6409bb02a450329d6c205c7a

[CL 24574858 by arciel rekman in ue5-main branch]
2023-03-09 08:57:33 -05:00
arciel rekman
80c58ff63e Track (first) owners of FShaderMapResource_SharedCode to improve leak investigation.
#rb Jason.Nadro, Rob.Krajcarski, Jeremy.Moore, Eric.Renaud-Houde
#preflight 6402182a59017a559b7df6bd
[REVIEW] [at]Jason.Nadro, [at]Rob.Krajcarski, [at]Jeremy.Moore, [at]Eric.Renaudhoude
#rnx

[CL 24507827 by arciel rekman in ue5-main branch]
2023-03-03 17:02:58 -05:00
arciel rekman
1baa660036 Fix not having materials in DLC cooked against -fastcook builds.
- Fastcook disables chunking of the game content, so when a DLC is cooked against it and its content is split according to regular chunk IDs, the game can no longer find the shader libraries (that get chunk-specific names). To remedy this, chunking of the DLC shader libraries is disabled, especially given that currently the actual DLC pak file isn't split into chunks (if and when it becomes so, we will reconsider).
- Also improved logging to better understand how the libraries are getting opened, given the multitude of possibilities.

#rb Jason.Nadro
[REVIEW] [at]Jason.Nadro
#preflight 63f6ec877064074bd8e15684 , also 63f79cfdef1b24bf940d3624

[CL 24397829 by arciel rekman in ue5-main branch]
2023-02-24 04:00:37 -05:00
christopher waters
1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00
kenzo terelst
ed4522e629 PSO precache improvement:
* Add support to boost PSO precache priority (used when render proxy for component is created but PSOs are not compiled yet)
* Add support to skip render proxy creation when PSOs are still compiling
* Add support to provide custom default vertex decleration taking the resource vertex elements into account (implemented for skin cache & spline mesh components)

#jira UE-171563	, UE-171567, UE-171570
#rnx
#rb Benjamin.Rouveyrol, Mihnea.Balta, Arciel.Rekman, Josie.Yang

[CL 23728474 by kenzo terelst in ue5-main branch]
2023-01-16 08:07:51 -05:00
Matt Peters
ae4fe47c8a Cooker LLM Tags: Add more tags around allocations made when cooking.
#rb None, trivial
#rnx
#preflight 6398aa088c5081ee9a3b9727

[CL 23493469 by Matt Peters in ue5-main branch]
2022-12-13 12:10:31 -05:00
axel riffard
1b019b643f Popup window on Metal platforms when no cooked content at startup
#jira UE-170334
#rb adam.kinge
#preflight 638991cb35192facc1a26564

[CL 23382006 by axel riffard in ue5-main branch]
2022-12-02 22:10:38 -05:00
christopher waters
615179b7f8 Adding includes and forward declarations for upcoming include changes.
#preflight 63891e309242c01326e955a5

[CL 23366615 by christopher waters in ue5-main branch]
2022-12-01 18:48:42 -05:00
arciel rekman
95b3818586 Use shader hashes for computing PrecachePSOHash.
- Allows construction of StatePrecachePSOHash in FGraphicsPipelineStateInitializers that are not associated with MDCs.
- Also better reflects the actual PSO compatibility.

[REVIEW] [at]Graham.Wihlidal, [at]Kenzo.TerElst
#preflight

[CL 23300306 by arciel rekman in ue5-main branch]
2022-11-28 19:16:55 -05:00
mickael gilabert
7328a90a2f If UMaterialInterface objects leak past the time at which the shader code library they depend on is closed, their material shader maps stay in the cache even though those shader maps are unusable even if the shader code library is re-opened. This can also affect newly loaded materials which use the same shader map, even if the shader code library has been re-opened.
This change prevents the cache being polluted by shader maps with forcibly released shaders.

[REVIEW] [at]arciel.rekman, [at]robert.millar
#rnx

[CL 23300180 by mickael gilabert in ue5-main branch]
2022-11-28 19:12:38 -05:00
arciel rekman
84798a8aea SCL: fix a deadlock by deleting library contents outside of the NamedLibrariesMutex's scope.
- Library deletion flushes render commands, but the rendering thread may be trying to access the libraries stack (for which it needs to acquire NamedLibrariesMutex), so holding that mutex during the deletion results in a deadlock. This change makes the deletion happen after the mutex is released.

- The mutex only guards the NamedLibrariesStack, not contents of any given library. It is still possible that a library being deleted is accessed by another thread that got a pointer to it beforehand, this change does not change anything in that regard. However, this should not happen if the higher level removes all the content from the unmounted plugin from memory prior to unmounting it (and closing the library), which it should do.

#rb CM Nordin, Justin Marcus
[REVIEW] [at]CarlMagnus.Nordin, [at]Mihnea.Balta, [at]Justin.Marcus
#preflight 637691b7b1509f1cc3094063

[CL 23190970 by arciel rekman in ue5-main branch]
2022-11-18 03:12:05 -05:00
Arciel Rekman
f5f6d47027 Make sure shader refcount cannot be 0 during the creation.
#rb Yuriy O'Donnell
#review @Arne.Schober
#jira
#preflight 636e9116953c19d435584df2

[CL 23101686 by Arciel Rekman in ue5-main branch]
2022-11-11 13:36:14 -05:00
arciel rekman
a042c334d4 Bring back RHI resource deletion when shader library is closed.
- Also, add flushing the pending deletes in the attempt to make sure any leftover RHI resources from the assets that used that library (which should be already queued for deletion at this point) are deleted before we remove the backing storage.

#rb Rex.Hill, Justin.Marcus, Luke.Thatcher
[REVIEW] [at]Rex.Hill
#preflight 636a7adb376a9cd6a856decc

[CL 23034312 by arciel rekman in ue5-main branch]
2022-11-08 14:20:19 -05:00
Arciel Rekman
a9a272c7a9 Support concurrent shader creation within a shadermap (UE-166109).
- Avoids oversubscription deadlock when multiple background threads are creating shaders during the PSO precaching.

#rb CM Nordin, Yuriy O'Donnell
#jira UE-166109
#review
#preflight 6365bb2b4b0e01486a9753be

[CL 23010571 by Arciel Rekman in ue5-main branch]
2022-11-07 10:15:34 -05:00
arciel rekman
8510cb4400 Fix another crash on exit due ot leaked global library's resources.
#rb none
[FYI] Justin.Marcus, CarlMagnus.Nordin
#preflight none

[CL 23000351 by arciel rekman in ue5-main branch]
2022-11-05 00:23:45 -04:00
arciel rekman
8615e858af Change Fatal log to a warning due to Global library's behavior.
#rb CM.Nordin
[FYI] Justin.Marcus, CarlMagnus.Nordin
#preflight none

[CL 22988920 by arciel rekman in ue5-main branch]
2022-11-04 12:17:41 -04:00
justin marcus
c31e3bcd3a Add fatal log to ~FShaderLibraryInstance. It is impossible for it to safely release resources from it's destructor.
[REVIEW] [at]Arciel.Rekman [at]Carl-Magnus.Nordin
#preflight https://horde.devtools.epicgames.com/job/6363c9b5dc30a4ce96fec50f

[CL 22968304 by justin marcus in ue5-main branch]
2022-11-03 17:57:51 -04:00
carlmagnus nordin
2b1c25c510 If a plugin contains a shader code library make sure to close it when unmounting the plugin
#preflight 6350ed84b13bfb29eb372a3b
#rb arciel.rekman

[CL 22651680 by carlmagnus nordin in ue5-main branch]
2022-10-20 04:48:12 -04:00