Commit Graph

790 Commits

Author SHA1 Message Date
zach bethel
de0fac09c7 Parallel RDG execution improvements.
- Added ERDGBuilderFlags::AllowParallelExecute to tag specific builders to attempt parallel execution. This avoids cases where small graphs fork tasks and end up causing contention. Only the main scene render graphs are tagged.
 - Moved RHI transition creation to an async task.
 - Moved parallel execute setup and dispatch to an async task.
 - Fixed RDG draining asserts using a short-term workaround by tagging relevant scene textures as non-transient.
 - Deprecated RDG AddPass utilities without names and fixed up last remnants.
 - Enabled parallel RDG execution by default.

#fyi christopher.waters

[CL 16925941 by zach bethel in ue5-main branch]
2021-07-22 12:42:14 -04:00
eric mcdaniel
3d26336c66 Fix for potential deadlock in shader preloads
FPreloadShaderTask takes the ShaderPreloadLock in FShaderCodeArchive::OnShaderPreloadFinished() and then issues an async read.  Another task can be picked up by the thread while waiting on that read.  If that new task is also a FPreloadShaderTask it will try to aquire the ShaderPreloadLock again and deadlock.

Introduce an EnsureReadNonBlocking method to IMemoryReadStream which can be called outside the lock to ensure the data is ready.  We can then lock and copy out the data without incuring a wait and the potential for another FPreloadShaderTask being run while we hold the lock.

#rb Ben.Ingram, Michal.Valient


#ROBOMERGE-SOURCE: CL 16917416
#ROBOMERGE-BOT: (v836-16769935)

[CL 16924675 by eric mcdaniel in ue5-main branch]
2021-07-22 11:45:06 -04:00
zach bethel
765c899d99 Modify RHI query checks so they can be done in a parallel rendering task.
#rb none

[CL 16924093 by zach bethel in ue5-main branch]
2021-07-22 11:17:25 -04:00
zach bethel
6d8c626425 Incremental fix-up to add names to RDG passes and use the correct RHI command list.
#rb christopher.waters

[CL 16923748 by zach bethel in ue5-main branch]
2021-07-22 10:59:17 -04:00
zach bethel
28f4f929ff Added support for separate memstack for tasks in RDG.
#jira none

[CL 16918469 by zach bethel in ue5-main branch]
2021-07-21 20:21:15 -04:00
Michael Noland
17cb6cd60e Rendering: Fixed mismatched PRAGMA_DISABLE_DEPRECATION_WARNINGS macros
#jira UE-119944

[CL 16906094 by Michael Noland in ue5-main branch]
2021-07-21 00:26:25 -04:00
Michael Noland
6c48dcc2e1 Rendering: Temporary fix for draw events asseting if called while the rendering thread is stopped (e.g., during a map rebuild)
#jira UE-119944
#rb zach.bethel

[CL 16904282 by Michael Noland in ue5-main branch]
2021-07-20 19:56:06 -04:00
Ben Ingram
f579f705be Fix cvar access
#rb none
#jira none

[CL 16898296 by Ben Ingram in ue5-main branch]
2021-07-20 12:56:50 -04:00
Arciel Rekman
c1a0dcddbb Properly support r.ShaderPipelines when filtering out non-pipelined shader types.
- Also, include this in the DDC key.

#rb Kevin.Ortegren
#review-16868749 @Jason.Nadro
#jira UE-117881

[CL 16897479 by Arciel Rekman in ue5-main branch]
2021-07-20 11:40:33 -04:00
yangke li
0a48229025 add RGB555A1 texture format support(not supported on Mac)
useful for RVT on mobile platforms, to save the cost of runtime compression
#rb Dmitriy.Dyomin mihnea.balta

[CL 16872220 by yangke li in ue5-main branch]
2021-07-16 11:38:24 -04:00
zach bethel
f7630c5690 Missing local file.
#rb none

[CL 16863831 by zach bethel in ue5-main branch]
2021-07-15 12:40:00 -04:00
danny couture
1ff405cb3a Skip FlushRenderingCommand in slowtask tick when there is nothing to cleanup
#rnx
#rb Francis.Hurteau

[CL 16857570 by danny couture in ue5-main branch]
2021-07-14 20:20:41 -04:00
Jian Ru
f38c7b640b Keep the default values of GDistanceFieldsPlatformMask and GRayTracingPlatformMask if their corresponding settings are not found in init files
#jira none
#fyi krzysztof.narkowicz

[CL 16853564 by Jian Ru in ue5-main branch]
2021-07-14 15:09:15 -04:00
zach bethel
cfdf2b7700 Remove split transition for swap chain textures. This avoids cases where certain platforms will stall at the beginning of graph execution.
#rb christopher.waters
#jira UE-119087

[CL 16850825 by zach bethel in ue5-main branch]
2021-07-14 11:50:54 -04:00
zach bethel
fa8201c2d0 Build fix for RDG compiled without GPU events.
#rb none

[CL 16840331 by zach bethel in ue5-main branch]
2021-07-13 14:29:12 -04:00
zach bethel
f311bbc7a1 RDG Parallel Execution (disabled by default)
- Refactored RDG to support free-threaded execution of passes.
 - Refactored renderer to use specific RHI command list variants in pass lambda. Immediate command list passes are forced to stay on the render thread, while other variants can be parallelized.

#rb christopher.waters

[CL 16838717 by zach bethel in ue5-main branch]
2021-07-13 12:38:27 -04:00
krzysztof narkowicz
3714db3ea2 Added per platform setting to toggle distance field support. If it's disabled then no distance data will be cooked and distance fields will be disabled on the target platform.
Renamed FDataDrivenPlatformInfo::AudioCompressionSettingsIniSectionName to TargetSettingsIniSectionName. It's now used to populate PlatformMask at runtime, to make sure that it matches between cook and runtime. Before it was possible to cook with e.g. GRayTracingPlaformMask=0, but then the cooked game would run with GRayTracingPlaformMask=1.

#rb Patrick.Kelly
[FYI] Patrick.Kelly, Daniel.Wright, Josh.Adams


#ROBOMERGE-OWNER: krzysztof.narkowicz
#ROBOMERGE-AUTHOR: krzysztof.narkowicz
#ROBOMERGE-SOURCE: CL 16825469
#ROBOMERGE-BOT: (v836-16769935)
#ROBOMERGE-CONFLICT from-shelf

[CL 16825718 by krzysztof narkowicz in ue5-main branch]
2021-07-12 11:20:21 -04:00
christopher waters
d5f57e697f RDGBuffer objects actually need destructing with their new TFunction members. This fixes a slow leak when using Buffer creation callbacks.
#jira none
#rb jian.ru, zach.bethel
#preflight 60d617e1caf05900010655a8

[CL 16787641 by christopher waters in ue5-main branch]
2021-06-25 15:34:06 -04:00
aurel cordonnier
d17d20ca36 Merge from Release-Engine-Test @ 16758890 to UE5/Main
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719 (and Release-17.00 @ 16658211)

[CL 16763350 by aurel cordonnier in ue5-main branch]
2021-06-23 17:51:32 -04:00
guillaume abadie
c1819a0532 Implements r.AntiAliasingMethod
#rb none
#preflight 60d33c8cd9586b000132acac


#ROBOMERGE-SOURCE: CL 16758022
#ROBOMERGE-BOT: (v835-16672529)

[CL 16758023 by guillaume abadie in ue5-main branch]
2021-06-23 11:38:33 -04:00
Brandon Schaefer
e1a0723eca Fix clang compiler warning/error
#jira none
#rb none
#fyi Arciel.Rekman, Aurel.Cordonnier

[CL 16751799 by Brandon Schaefer in ue5-main branch]
2021-06-22 19:49:50 -04:00
Martin Ridgers
8f406d2b0e Move RHI_API into the UE_TRACE_CHANNEL_EXTERN() macro so it compiles if the macro is a stub.
[CL 16748765 by Martin Ridgers in ue5-main branch]
2021-06-22 16:37:17 -04:00
Ola Olsson
e9276fc6db Combing GPU-Scene instance culling and the id-list generation into one step, and the same for VSM
- Uses the InstanceCullingLoadBalancer to pre-distribute the work on the CPU to ensure even load.
 - Make instance culling use the instance data offset in MDC instead of translating primitive IDs.
 - Track single-instance draws separately from instanced to optimize handling (disable culling for single-instance primitives).

#rb Graham.wihlidal,andrew.lauritzen
#fyi dmitriy.dyomin
#preflight 60d0eafa2ab2180001269160

[CL 16733827 by Ola Olsson in ue5-main branch]
2021-06-21 16:51:39 -04:00
dmytro vovk
abd3a59d4d Removed ES 3.1 redundant feature level checks
#jira none
#rb Dmitriy.Dyomin

[CL 16727513 by dmytro vovk in ue5-main branch]
2021-06-21 09:19:59 -04:00
Wei Liu
8208074bf6 1. Unify the lighting calculation for both mobile deferred and forward.
2. Add an option to use high quality BRDF on mobile as the same with PC.
3. Fallback to default light shading model if it is not supported on mobile.
4. Use EnvBrdf for mobile deferred lighting pass.

#jira none

#rb Dmitriy.Dyomin
#preflight 60cdef32be81e8000118d85c

[CL 16722349 by Wei Liu in ue5-main branch]
2021-06-19 10:01:53 -04:00