Commit Graph

27 Commits

Author SHA1 Message Date
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
christopher waters
5953546bfb Adding RHIUniformBufferLayoutInitializer and RHIUniformBufferLayout is a proper FRHIResource. This brings proper RHI lifetime support to RHIUniformBufferLayout so we don't delete the layouts while RHI commands that use them are still in flight.
This should fully address UniformBufferLayout/UniformBuffer crashes that randomly happen during shader compiling in the Editor.

#jira none
#rb arciel.rekman, ben.ingram, mihnea.balta, stu.mckenna, will.damon
#preflight 611eb6c6008be90001f8b031

#ROBOMERGE-SOURCE: CL 17243608 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17243630 by christopher waters in ue5-release-engine-test branch]
2021-08-19 23:56:04 -04:00
christopher waters
1c21a5489c Shader symbol terminology changes
- Splitting symbol generation and shader "debug info" generation into two different cvars. This should now allow us to generate symbols post-packaging without generating different shader variants. This should also enable us to always generate symbols and still have the final deduplicated shader sizes.
- r.Shaders.Symbols is now the primary way to enable shader symbols for debugging.
- r.Shaders.GenerateSymbols can be enabled to always generate symbols without writing them to disk.
- r.Shaders.WriteSymbols can be used to force write symbols if they were previously generated.
- r.Shaders.ExtraData can be used to generate shader names for engine runtime systems to use.
- NotifyShaderCooked replaced with NotifyShaderCompiled, prep for upcoming non-cook symbol writing.
- PC DXC shader compiles should only generate debug info when requested, not all the time.
- PC FXC shader compiles should generate debug info when requested, not just when r.Shaders.Optimize is 0.

#jira none
#rb arciel.rekman, lukas.hermanns
#preflight 611ad9035e737200015992db

#ROBOMERGE-SOURCE: CL 17186155 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17186162 by christopher waters in ue5-release-engine-test branch]
2021-08-16 23:18:23 -04:00
aurel cordonnier
25a11deeac Merge from Release-Engine-Staging @ 16579919
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16581170 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-07 20:09:45 -04:00
ben ingram
1ef1e5f4d0 Don't call destructors when destroying frozen objects
- Frozen memory images may have de-duplicated sections, where the same object is referenced multiple times; this means default destructors might be called multiple times, which is not supported in general
- Add a hook to allow custom behavior to destroy frozen objects that may hold references to external resources
- Within shader system, no need to run destructors, since all memory should be owned by the top-level memory image
#jira none
#rb arciel.rekman, charles.bloom

#ROBOMERGE-SOURCE: CL 16278300 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v799-16237190)

[CL 16278915 by ben ingram in ue5-release-engine-test branch]
2021-05-11 16:29:41 -04:00
Yuriy ODonnell
defa207e04 Disabled high-frequency CPU profiler scopes for FShaderMapContent::GetShader by default. Add FMaterial::GetShader only for the slow path branch.
#rb none

[CL 15690528 by Yuriy ODonnell in ue5-main branch]
2021-03-13 07:09:37 -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
Ben Ingram
3e62b2de7c Allow UnfrozenCopy to copy data that was frozen with FPlatformLayoutParameters that are different from the current/local platform
- This is used to allow editor to load cooked materials/shader maps
- Remove UE_FORCE_64BIT_MEMORY_IMAGE_POINTERS, and instead always force memory image ptrs to be 64bits...this simplifies some code, and plan is to remove 32bit support at some point anyway
- Frozen memory image pointers only need 32bits for offset, which leaves another 32bits to stash a type identifier...this allows us to interpret that frozen data being referenced, even it's packed for a different platform
#jira UE-91444
#rb arciel.rekman

[CL 14592392 by Ben Ingram in ue5-main branch]
2020-10-27 16:35:01 -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
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -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
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
37a9216d19 #jira none
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 13053391 in //UE4/Release-4.25/... via CL 13053394 via CL 13053520
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v686-13045012)

[CL 13053522 by ben ingram in Main branch]
2020-04-27 22:11:56 -04:00
Ben Ingram
66944fbb51 Fix merge of shader changes from Release-4.25 combined with optimizations from FN
#rb none

[CL 12960787 by Ben Ingram in Main branch]
2020-04-21 15:57:02 -04:00
ben ingram
68fbb75271 #jira UE-92139
Fix issues causing material DDC values to be non-determinisic
- Shader code within resources sorted by hash
- Debug source code values sorted by type
Also add mechanism to serialize any MemoryLayout described type to string
- Makes it easier to inspect material data to find sources of non-determinism
#rb none

#ROBOMERGE-OWNER: ben.ingram
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 12944988 in //UE4/Release-4.25/... via CL 12944998 via CL 12957822
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12957827 by ben ingram in Main branch]
2020-04-21 13:46:17 -04:00
ben ingram
54a7ace313 Fix RemoveShaderTypePermutaion(), avoid crash when recompiling shaders
#rb none

#ROBOMERGE-SOURCE: CL 12759664 via CL 12759665 via CL 12759667
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200)

[CL 12759668 by ben ingram in Main branch]
2020-04-13 14:29:28 -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
6df10f716d Do not log errors when loading shaders for other RHIs.
- If a game targets both Vulkan and D3D, when running with -vulkan D3D shaders will not be loaded.

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

#ROBOMERGE-SOURCE: CL 12571714 in //UE4/Release-4.25/... via CL 12571775 via CL 12571793
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12571822 by arciel rekman in Main branch]
2020-04-02 16:00:42 -04:00
arciel rekman
15a2eef5e0 Fix running -nullrhi with native shader libraries (UE-91432).
#rb Ben.Ingram
#jira UE-91432

#ROBOMERGE-SOURCE: CL 12513296 in //UE4/Release-4.25/... via CL 12513299 via CL 12513301
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12513305 by arciel rekman in Main branch]
2020-04-01 20:32:33 -04:00
ben ingram
b228145b70 #jira UE-89039
Don't crash when loading cooked shader maps (where frozen content most likely doesn't match runtime layout)
#rb none

#ROBOMERGE-SOURCE: CL 12158100 in //UE4/Release-4.25/... via CL 12158105
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v659-12123632)

[CL 12158115 by ben ingram in Main branch]
2020-03-12 20:19:35 -04:00
ben ingram
05a97970f5 #jira UE-89915
Fix recompileshaders running on target with COTF server
#rb none
[FYI] Yuriy.ODonnell

#ROBOMERGE-SOURCE: CL 11892983 in //UE4/Release-4.25/... via CL 11892985
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11892989 by ben ingram in Main branch]
2020-03-03 19:38:43 -05:00
ben ingram
0a075fa273 #jira none
Fix inconsistent operator new/FMemory:Free pair when deleting frozen shaders
- Also fix leaked memory when deleting frozen shaders
[FYI] brandon.schaefer
#rb none

#ROBOMERGE-SOURCE: CL 11850249 in //UE4/Release-4.25/... via CL 11850252
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11850702 by ben ingram in Main branch]
2020-03-02 21:52:11 -05:00
ben ingram
6e9b509d08 #jira none
Fix generation of shader debug data
#rb none

#ROBOMERGE-SOURCE: CL 11850208 in //UE4/Release-4.25/... via CL 11850214
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11850701 by ben ingram in Main branch]
2020-03-02 21:52:09 -05:00
arciel rekman
ab98bbb6ac Allow missing shader resources for other shader platforms (UE-89441).
#rb Ben.Ingram
#jira UE-89441
[FYI] Carl.Lloyd, Jeff.Fisher

#ROBOMERGE-SOURCE: CL 11611017 in //UE4/Release-4.25/... via CL 11611019
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v655-11596533)

[CL 11611048 by arciel rekman in Main branch]
2020-02-25 13:39:14 -05:00
Ben Ingram
f7de3b4f6b #jira UE-88436
Convert some checks() into checkf(), to hopefully gather more information about failing check
#rb none

[CL 11355736 by Ben Ingram in Main branch]
2020-02-11 16:05:35 -05:00