Lightmap resources were not recreated correctly when when the feature level changed. Also, modified FRenderResource::ChangeFeatureLevel() so that it doesn't recreate resources which are already using the correct feature level.
#jira UE-79367
#rb daniel.wright
#lockdown cristina.riveron
#ROBOMERGE-SOURCE: CL 8376524 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v406-8472469)
[CL 8498103 by mihnea balta in Main branch]
#rb Ben.Woodhouse,Jonas.Meyer,Rolando.Caloca
#ROBOMERGE-SOURCE: CL 8375899 via CL 8380119
#ROBOMERGE-BOT: (v402-8361577)
[CL 8380167 by jian ru in Main branch]
#rb jian.ru
[FYI] andrew.ladenberger
#rnx
#ROBOMERGE-SOURCE: CL 8374629 via CL 8379334
#ROBOMERGE-BOT: (v402-8361577)
[CL 8379448 by jordan cristiano in Main branch]
This affects FGlobalDynamicReadBuffer, FGlobalDynamicVertexBuffer and FGlobalDynamicIndexBuffer.
"r.NumFramesUnusedBeforeReleasingGlobalResourceBuffer"
Number of frames after which unused global resource allocations will be discarded. Set 0 to ignore. (default=30)
Also added shrinking logic to the FNiagaraDataSet buffers:
"fx.NiagaraDataBufferMinSize"
Niagara data buffer minimum allocation size in bytes. (Default=512)
"fx.NiagaraDataBufferShrinkFactor"
Niagara data buffer size threshold for shrinking. (Default=3)
The buffer will be reallocated when the used size becomes 1/F of the allocated size.
#rb shaun.kime, simon.tovey
#ROBOMERGE-SOURCE: CL 8097674 via CL 8108818
#ROBOMERGE-BOT: (v401-8057353)
[CL 8108895 by uriel doyon in Main branch]
Don't consider VT enabled if only 'r.VirtualTexturedLightmaps' is set (but 'r.VirtualTexturing' is not)
This cvar config is not valid, but still possible to manually set the cvars to this state
#rb none
#lockdown nick.penwarden
#ROBOMERGE-SOURCE: CL 8102070 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v401-8057353)
[CL 8102079 by ben ingram in Main branch]
#rb thomas.ross
#ROBOMERGE-SOURCE: CL 8068523 via CL 8068528 via CL 8068894 via CL 8094505
#ROBOMERGE-BOT: (v401-8057353)
[CL 8094643 by peter sauerbrei in Main branch]
#rb none
[FYI] ben.woodhouse
#rnx
#ROBOMERGE-SOURCE: CL 8040907 via CL 8041828 via CL 8044376 via CL 8046905
#ROBOMERGE-BOT: (v400-8057353)
[CL 8066272 by mickael gilabert in Main branch]
Merging using //Fortnite/Main/_to_/UE4/Dev-Rendering
#rb none
Also tested on mobile with Dmitriy.
Improvement and optimisation pending with https://docs.google.com/document/d/17fBBGX_cP9YARfiBU3P9BIElOo2m6IpqJhRXOZvzXa0/edit#heading=h.tuqnyahzdlw8
Integrated / edtigrated CLs are
7555515
7559183
7565353
7577376
7593568
7624000
7785404
7785501
7839046
7861664
7949251
7949481
7951875
7973183
#ROBOMERGE-OWNER: krzysztof.narkowicz
#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 8020041 via CL 8027701
#ROBOMERGE-BOT: (v400-8057353)
[CL 8062409 by krzysztof narkowicz in Main branch]
#jira UE-78484
#tests tested some niagara effects after and looked correct
#rb none
[FYI] zach.bethel
#ROBOMERGE-SOURCE: CL 7841367 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v389-7813075)
[CL 7841368 by shaun kime in Main branch]
Integrated from //UE4/Dev-Rendering
#rb none
#rnx
#ROBOMERGE-SOURCE: CL 7788444 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v388-7785529)
[CL 7788460 by jeremy moore in Main branch]
- This fixes massive memory bloat with a Niagara system spawning 10k particles, as each frame we add more particles we were allocating a new buffer. In the end I saw 94 buffers allocated of varying sizes, the rough memory savings here (at least from a stat POV) is ~70mb.
#rb none
#jira UE-77393
[FYI] shaun.kime, simon.tovey
#ROBOMERGE-SOURCE: CL 7644180 via CL 7644917
#ROBOMERGE-BOT: (v372-7473910)
[CL 7644938 by stu mckenna in Main branch]
#jira
#rnx
#rb Marcus.Wassmer
#ROBOMERGE-SOURCE: CL 7611003 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v372-7473910)
[CL 7611027 by marc audy in Main branch]
#jira UE-76546
#rb marcus.wassmer
#ROBOMERGE-SOURCE: CL 7277248 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v369-7254125)
[CL 7277251 by michal valient in Main branch]