The ERenderingThread named thread tag is not removed from ActiveNamedThreads when the render thread crashes, because the stack isn't unwound; this causes the assert in FTaskTagScope to fire when the Exit() method tries to set the tag. This resulted in the assert showing up as the cause of the crash, obscuring logs, crash reports etc.
#rnx
#lockdown Juan.Canada
#jira UE-143055
#rb Andriy.Tylychko, Arne.Schober, danny.couture
#preflight 620e35768b6428e701a2098d
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 19068406 in //UE5/Release-5.0/... via CL 19087994
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19130574 by mihnea balta in ue5-main branch]
- SubmitCompileJobs was assumed to be render thread only. Make this explicit in the function name and add a render thread check.
- Add SubmitCompileJobs_GameThread to perform shader compilation submitted from the Game Thread safe.
- Keep a ref to a GameThreadPendingCompilerEnvironment because the one on the GameThreadShaderMap goes away after we clone.
- Add render thread check to GetRuntimeVirtualTextureOutputAttibuteMask_RenderThread
- Move simple enum types from ShaderCompiler.h to ShaderCompilerCore.h so we can access EShaderCompileJobPriority in MaterialShared.h
- Fixup incorrect usage SubmitCompileJobs that was submitted from the Game Thread using the Render Thread maps.
#rb Ben.Ingram
#jira none
#preflight 6216879fdb60b6b592f1d97f
[CL 19098715 by Jason Nadro in ue5-main branch]
- The function was not checking to see if the shader type in the pipeline was the same as the shader type we are asking for.
#rb Ben.Ingram
#jira none
#preflight 62156610840463c99a740f2f
[CL 19089930 by Jason Nadro in ue5-main branch]
Correctly write to MemoryImageNames array, copy contents of TArrayView rather than the layout of the view object itself, handle name layout during patch application on foreign platforms.
#rb none
[FYI] johan.torp, ben.ingram
#ROBOMERGE-OWNER: Ben.Woodhouse
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19068807 via CL 19068829 via CL 19074886 via CL 19075335 via CL 19077116
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19077183 by robert millar in ue5-main branch]
This avoids to define STRATA_ENABLED as 'env. define' for all global shaders needing a Strata specific path.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 62151b25797dbbeb472ae2eb
[CL 19074999 by Charles deRousiers in ue5-main branch]
- works for starta and legacy conversion material
- legacy converted to strata setup the strata blending mode
- strata material also affect legacy blending mode because it is used in multiple places in the engine.
- works for lit and unlit legacy material
- to be fixed:
- lit with premultiplied alpha
- materials with multiple shading models
#preflight https://horde.devtools.epicgames.com/job/6214893c3577e44741abf99f
#rb charles.derousiers
[CL 19069633 by Sebastien Hillaire in ue5-main branch]
#rnx
#rb trivial
#preflight 620a2cb9d332bab85315e3c6
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 18977627 via CL 18978035 via CL 18978043 via CL 18978044 via CL 18992701 via CL 18992998
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
[CL 18997314 by mihnea balta in ue5-main branch]
Last attempt failed some editor tests since those tests construct buffers with bNeedsCpuAccess = false even though editors must keep all resources. Changing the condition for freeing the resource object to see if its array was freed directly.
Original description:
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb jordan.cristiano
#preflight 620529984c6c33118fa6fdc7
[CL 18937113 by evgenii babinets in ue5-main branch]
Second attempt at fixing a GameThread stall (waiting for render thread) whenever a CVar is changed during gameplay.
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight 62017cbae9567e667308aa18
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18894475 via CL 18894521 via CL 18894553 via CL 18896447 via CL 18896609
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
#ROBOMERGE-CONFLICT from-shelf
#preflight 6203cc23530b346f8618b67b
[CL 18917352 by evgenii babinets in ue5-main branch]
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight 62017cbae9567e667308aa18
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18894475 via CL 18894521 via CL 18894553 via CL 18896447 via CL 18896609
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
#ROBOMERGE-CONFLICT from-shelf
[CL 18896978 by evgenii babinets in ue5-main branch]
Replace the map with an array for efficiency.
#jira UE-141110
#rb arciel.rekman
#rnx
#preflight 61fc374ca540d6e61bba7104
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 18886818 in //UE5/Release-5.0/... via CL 18886830 via CL 18887180
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18887383 by pj kack in ue5-main branch]
- backing out this change as it broke Xbox in UE5/Main
- Example failed Horde tests:
- https://horde.devtools.epicgames.com/job/61fd7dc8a6165e535689f6e4?step=0856
- https://horde.devtools.epicgames.com/job/61fd7dc8a6165e535689f6e4?step=0250
#rb evgenii.babinets
#jira none
#preflight 61fdcfa1e65336d1455736bc
#fyi evgenii.babinets
Original CL Desc
-----------------------------------------------------------------
Fixed a GameThread stall (waiting for render thread) whenever a CVar is changed during gameplay.
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight Horde doesn't work, but compiled locally.
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18862796 via CL 18862801 via CL 18862826 via CL 18863875 via CL 18864138
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18878916 by eric mcdaniel in ue5-main branch]
Allow more flexibility of the Metal RHICopyToResolveTarget to include compatable texture view pixelformats. Fixes validation error when resolving between sRGB and RGB formats.
FMetalContext: don't assert then go into the weeds on macOS when there are no render targets.
#jira UE-140658, UE-120222
#preflight 61fd124b2839dd07cb98d771
[REVIEW] [at]will.damon, [at]Guillaume.Abadie
#rb will.damon, Guillaume.Abadie
#lockdown cristina.riveron
#rnx
#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 18864871 in //UE5/Release-5.0/... via CL 18864881 via CL 18865081
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18865102 by richard wallis in ue5-main branch]
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight Horde doesn't work, but compiled locally.
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18862796 via CL 18862801 via CL 18862826 via CL 18863875 via CL 18864138
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18864159 by evgenii babinets in ue5-main branch]