Commit Graph

1387 Commits

Author SHA1 Message Date
guillaume abadie
94c83bc743 Implements r.DumpGPU.CompressResources
#rb juan.canada
#preflight 6230d00c161b1005592ca695

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 19389343 via CL 19389781
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19392836 by guillaume abadie in ue5-main branch]
2022-03-15 15:53:25 -04:00
guillaume abadie
52e8f551af Adds dump timing measurement details to log when using DumpGPU
#rb none
[FYI] juan.canada
#jira UE-144533
#preflight 6230a2951e073a48a4d1df7a

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 19386000 via CL 19387417
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19389082 by guillaume abadie in ue5-main branch]
2022-03-15 13:52:36 -04:00
Devin Doucette
01274b17c8 Logging: Added a dedicated master thread for logging
#preflight 622fb0eca709bd110fea0da5
#rb Zousar.Shaker

[CL 19387540 by Devin Doucette in ue5-main branch]
2022-03-15 12:31:55 -04:00
Sebastien Hillaire
d28a031400 Strata - beginning of rough refraction of sub layers (with scene lighting split into untouched, sss and rough reffracted luminance)
- separate SSS, opaque rough refraction and scene color output when strata project setting is enabled.
- simple placeholder per pixel variance from roughness/layers computation
- SSS only reads from subsurface buffer when ORR is enabled
- Added simple combine pass to final scene lighting (no blur for now)
- Started adding tiling but reached UAV count limit. I will refactor code later to workaround that.
- Updated light rendering, reflection environment pixel shader. Next will be lumen and clustered deferred shading.

#preflight https://horde.devtools.epicgames.com/job/622fc09fe348fe2ada4214f8
#rb none
#fyi charles.derousiers, tiantian.xie

[CL 19382940 by Sebastien Hillaire in ue5-main branch]
2022-03-15 03:11:08 -04:00
Luke Thatcher
ee64a28f30 Copying //UE5/Dev-ParallelRendering to //UE5/Main
This change is the copy-up of work from //UE5/Dev-ParallelRendering to unify the various RHI texture types
 - The separate RHI texture types (FRHITexture2D, FRHITexture2DArray, FRHITexture3D, FRHITextureCube, FRHITextureCubeArray) have been replaced with a single type: FRHITexture.
 - Includes the required refactoring / fixes for the various platform RHIs.

The old texture types are still supported via typedefs, but will soon be marked deprecated. Future rendering code should make use of the FRHITexture type instead.

#jira UE-139559
#rb Mihnea.Balta
#preflight 622f3af819287beb2c3047f6
#robomerge[FN_ENGINEMERGE] DEV-NC

[CL 19371962 by Luke Thatcher in ue5-main branch]
2022-03-14 09:14:58 -04:00
mihnea balta
3e7a9cd772 Fix crash on exit due to RHI commands enqueued by the transient allocator being executed after the allocator is destroyed.
#jira UE-145180
#rnx
#lockdown Michal.Valient
#preflight 6228a8130d5a90e98ebbfca0
#rb Zach.Bethel

#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 19322378 in //UE5/Release-5.0/... via CL 19324115
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19348081 by mihnea balta in ue5-main branch]
2022-03-10 21:53:51 -05:00
jason hoerner
5f20bd8872 MGPU: Fix for light map artifacts when reloading lighting following a bake. Need to unbind SRVs used for scatter upload buffers, as we sometimes reuse the scatter upload buffers multiple times in a frame, and modifying them when they were bound can cause them to fail to update in the driver. Strangely, this was only occurring on the second GPU... I also added GPU mask blocks in a couple GPU scene update functions, for good measure.
The bound SRV issue could cause artifacts elsewhere in similar situations, but I didn't want to add perf overhead or complexity checking for this case everywhere, and decided to do a spot fix.  I didn't notice any other obvious cases where we have persistent buffers written to multiple times in a frame, like is done for the scatter upload buffers.  Still, it remains something to be alert for in case there are future rendering bugs.

#jira UE-143952
#rnx
#rb kenzo.terelst christopher.waters
#lockdown mihnea.balta
#preflight 6227ef770d5a90e98ea5f87d

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 19322316 in //UE5/Release-5.0/... via CL 19324110
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19348075 by jason hoerner in ue5-main branch]
2022-03-10 21:53:39 -05:00
jian ru
798eacf38e Fix a memory stomp caused by writing to a released FLastRenderTimeContainer
[REVIEW] [at]peter.sauerbrei, [at]ben.woodhouse, [at]allan.bentham
#localization none
#tests ran ReplayRun tests on multiple platforms

#ROBOMERGE-AUTHOR: jian.ru
#ROBOMERGE-SOURCE: CL 19315963 via CL 19315975 via CL 19315977 via CL 19316728 via CL 19317123 via CL 19317129
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347780 by jian ru in ue5-main branch]
2022-03-10 21:40:52 -05:00
jamie hayes
34d31e3fcc Convert Nanite's Micropoly Rasterize CS to a material shader.
Added some support for setting material parameters on a CS and with an FRHIComputeCommandList.
Disable programmable raster for now because the micropoly shader requires DXC for the moment.

#rb graham.whlidal
#preflight skip

#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 19314277 via CL 19314281
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347713 by jamie hayes in ue5-main branch]
2022-03-10 21:36:25 -05:00
Lukas Hermanns
c6ed66feff Enable CFLAG_ForceDXC for platforms that require DXC for HLSL2021.
#rb Guillaume.Abadie
#jira UE-138358
#preflight 622918411f1ec97d4e9741aa
#rnx

[CL 19325937 by Lukas Hermanns in ue5-main branch]
2022-03-09 16:26:11 -05:00
Lukas Hermanns
999fb99c6c Enable HLSL 2021 language version (CFLAG_HLSL2021) in shader compiler backends.
#rb Guillaume.Abadie, Will.Damon
#fyi Carl.Lloyd, Ryan.Vance, Christopher.Waters, Mihnea.Balta, Rolando.Caloca, Yuriy.ODonnell, Graham.Wihlidal
#jira UE-138358
#preflight 6227b6b3c653e7ef9f571dc8

[CL 19319858 by Lukas Hermanns in ue5-main branch]
2022-03-09 09:47:28 -05:00
chris kulla
f4c4970e96 Unify GPU Lightmass shader selection with Path tracing
The logic was nearly identical between both cases, refactoring allows us to share more code and remove virtual calls from FRayTracingMeshProcessor.

Also cleanup the way supported Vertex Factory types are detected by adding a new vertex factory flag.

#rb Juan.Canada
#preflight 6227967d31133a23da4a56bf

[CL 19305870 by chris kulla in ue5-main branch]
2022-03-08 13:03:14 -05:00
tiago costa
e01a204611 Get instance transforms of Primitives supporting ERayTracingPrimitiveFlags::CacheInstances from GPUScene.
- Avoid extra copy and upload of transforms.
- Added FRayTracingGeometryInstance::BaseInstanceSceneDataOffset to skip creating an array of instance data offsets when they are continuous.
- Saves around 50MB on CitySample.

#rb yuriy.odonnell
#preflight 6225f85bb97fb949cf3518fa

[CL 19302183 by tiago costa in ue5-main branch]
2022-03-08 09:20:04 -05:00
Josie Yang
865cd14c53 Refactor to simplify ray tracing geometry update logic for skeletal mesh.
*) All skin cache entries needing RT geometry update are processed altogether in end-of-frame update whether batch dispatching or not, simplifies the logic.
*) Transition buffers to read immediately after skin cache DoDispatch calls, simplifies the logic.
*) No longer cache the flag to indicate whether RT geometry needs rebuild, the logic is calculated directly when updating RT geometry.

#jira FORT-447473
#rb Aleksander.Netzel, Juan.Canada
#preflight 621cd5339a5676d19a327a29

[CL 19177064 by Josie Yang in ue5-main branch]
2022-02-28 13:14:10 -05:00
arciel rekman
1ae3ed9f92 Fix includes from generated files not being hashed during shader compilation (UE-134273).
- Fixes lack of recompilation when touching a vertex factory's .ush.
- Makes job input hash generation more robust generally by following the includes.
- Unfortunately, introduces a 5-10% perf hit when submitting jobs.
- Also contains changes to make -noshaderddc apply to global shaders

#jira UE-134273
[REVIEW] [at]Jason.Nadro, [at]Ben.Ingram
#preflight 6219118bf014007cf8b740c8

#ROBOMERGE-OWNER: arciel.rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19150976 in //UE5/Release-5.0/... via CL 19151794
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19161059 by arciel rekman in ue5-main branch]
2022-02-25 19:32:49 -05:00
zak middleton
cbbda06e18 #ue5 - Fix FMath::Clamp() and FMath::GridSnap() incorrectly mixing signed/unsigned types when an explicit signed template type is requested.
Changed macro used to resolve overloads for these 2 functions to the one requiring one actual float/double type in the arguments. Removed old macro that allowed mixing signed/unsigned int types and replaced it with one that requires all the types to be signed to match any overloads (tested but currently unused).

Resolved some compile errors that resulted from newly ambiguous calls that mixed signed/unsigned integer types.

#jira UE-143473
#rb Andrew.Davidson
#preflight 6215382b30639b44d2f52355


#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 19098314 via CL 19099699 via CL 19100188 via CL 19100709 via CL 19109894
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147214 by zak middleton in ue5-main branch]
2022-02-25 10:09:25 -05:00
jonathan bard
9372101ef9 * Added a scope object (IModularFeatures::FScopedLockModularFeatureList) to more easily lock/unlock the list of modular features when accessing it.
* Fixed render capture provider firing an assert when accessing IModularFeatures from outside the game thread (naive implementation for now, since this is a accessed very sporadically)
* Avoid locking the modular features list when calling GetEngineCrypto(), since the IEngineCrypto* is only accessed once and stored in a static member

#rb peter.knepley, carl-magnus.nordin

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19091116 via CL 19097126 via CL 19098363 via CL 19105418
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19146756 by jonathan bard in ue5-main branch]
2022-02-25 09:47:32 -05:00
juan canada
19391cbec9 Fixed crash in GPU Lightmass when debug mode was enabled
#rb mihnea.balta
#preflight 620bcc494353dc61c7f70142
#jira UE-133621


#ROBOMERGE-AUTHOR: juan.canada
#ROBOMERGE-SOURCE: CL 19092810 via CL 19093421 via CL 19094484 via CL 19095987 via CL 19105292
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19146560 by juan canada in ue5-main branch]
2022-02-25 09:39:31 -05:00
mihnea balta
e4dd7a950d Fix assert when the render thread crashes which was obscuring the real location of the crash.
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]
2022-02-24 18:45:28 -05:00
Jason Nadro
dcd55e3f15 Fix Game Thread and Render Thread access issues when performing shader compilation using FMaterial.
- 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]
2022-02-23 14:59:45 -05:00
Jason Nadro
52f9210b79 Fix a bug with GetMaxNumInstructionsForShader that report the incorrect instruction count for the given shader type.
- 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]
2022-02-23 08:41:47 -05:00
Jeremy Moore
5c2bc8c5b2 Move ShaderMetaDataBuilder code into ComputeFramework which is the only place using it.
Preliminary to adding better support for nested structs.
#rnx
#preflight 62155451dc0170cfb36dfc69

[CL 19081188 by Jeremy Moore in ue5-main branch]
2022-02-22 16:34:35 -05:00
robert millar
b7b8b8d70c Fixes for memory image names.
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]
2022-02-22 14:13:32 -05:00
Charles deRousiers
a02d41c4ee Renamed PROJECT_STRATA into STRATA_ENABLED.
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]
2022-02-22 12:35:58 -05:00
Sebastien Hillaire
7c6830b98e Strata - new blending mode.
- 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]
2022-02-22 02:26:20 -05:00