Files
UnrealEngineUWP/Engine/Source
mihnea balta 68ca77657c Fix problems with the GetUsedMaterials and GetMaterialsAffectedByTexture methods of FObjectCacheContext:
* when render state changes and material used notifications were sent from SendAllEndOfFrameUpdates, they were added to a stack instead of a queue, so they were applied in reverse order. This meant that the component -> material mapping was first set and then cleared, instead of the other way around, so components which took this path were missing from the cache.
* dynamic material instances were not adding themselves to the textures -> materials map, so GetUsedMaterials was not taking them into account.

The result was that we were not recreating the mesh draw commands for primitives missed due to these reasons, leading to crashes from using stale uniform buffer pointers.

#jira UE-145769
#rnx
#preflight https://horde.devtools.epicgames.com/job/62bdca37b447118888e9acfe
#rb Brandon.Dawson, Arciel.Rekman, Danny.Couture

[CL 20911562 by mihnea balta in ue5-main branch]
2022-07-01 03:30:06 -04:00
..