Commit Graph

1028 Commits

Author SHA1 Message Date
graham wihlidal
4ec3fc585b Removed LocalToWorld and PrevLocalToWorld from FPrimitiveInstance (instead the concatenating of instance and primitive transforms happens during SoA construction right before GPU Scene upload). In the future we'll also have a custom GPU Scene upload kernel that can do things like the concatentation (among other derivations) right on the GPU, but not affect the hot path of stuff like GetInstanceData(). This change also renames (Prev)InstanceToLocal to (Prev)LocalToPrimitive to make a lot more sense than the previous naming.
#rb ola.olsson, krzysztof.narkowicz, rune.stubbe
[FYI] brian.karis, jason.nadro


#ROBOMERGE-SOURCE: CL 16614552
#ROBOMERGE-BOT: (v828-16531559)

[CL 16614986 by graham wihlidal in ue5-main branch]
2021-06-09 19:08:26 -04:00
christopher waters
17e4707703 Adding CreateUploadBuffer helpers.
Adding FRDGUploadData to create upload data directly from the GraphBuilder persistent memory.

#jira none
#rb Zach.Bethel
#preflight 60c0de551264df00015e307a

[CL 16613071 by christopher waters in ue5-main branch]
2021-06-09 17:17:23 -04:00
rolando caloca
d7a4ece397 UE5EA - Fix threading issue when updating devices with Turnkey
One should not access target platform manager outside the game thread - in this case the target platforms array was invalidated while rendering thread was requesting info which was also causing it to re-initialize
#rb Josh.Adams
#jira UE-116932
#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 16596321 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v828-16531559)

[CL 16596377 by rolando caloca in ue5-main branch]
2021-06-08 19:07:53 -04:00
graham wihlidal
5b31085baa Instance data optimizations - removed NonUniformScale and InvNonUniformScale from CPU, since they are already derived on the GPU from LocalToWorld as of CL 15961534
#rb ola.olsson
[FYI] brian.karis, rune.stubbe, krzysztof.narkowicz


#ROBOMERGE-SOURCE: CL 16590891
#ROBOMERGE-BOT: (v828-16531559)

[CL 16590932 by graham wihlidal in ue5-main branch]
2021-06-08 15:21:52 -04:00
jonathan bard
c27ab58ce8 Fixed transient texture array not properly created
#rb zach.bethel
#jira none
#preflight 60bf36897ed0b6000110a34a

[CL 16585964 by jonathan bard in ue5-main branch]
2021-06-08 08:12:51 -04:00
Wei Liu
de5a48902e 1. Fix a bug of missing velocity due to wrong LoadAction for parallel rendering.
2. Add a project setting option to avoid generating velocity and TAA shader unexpectly for mobile platform.

#jira none

#rb Dmitriy.Dyomin, Guillaume.Abadie

[CL 16584354 by Wei Liu in ue5-main branch]
2021-06-08 06:01:07 -04:00
graham wihlidal
c3dcd43b0a Implemented a new 32bit bounding box type called FRenderBounds, which complements FRenderTransform. This implementation does not require a boolean to keep track of initial invalid state, the bounds merging is vectorized (safe for unaligned float3 data), and it also doesn't store the sphere radius (keep memory down for heavy instanced content). Future optimizations and work around tighter encoding (reduced extent precision with a conservative roundup?) and also LWC can change the underlying implementation of these types without changing every callsite; should also switch to center+extent later.
#rb krzysztof.narkowicz, rune.stubbe
[FYI] brian.karis, ola.olsson, jason.nadro, zak.middleton


#ROBOMERGE-SOURCE: CL 16577543
#ROBOMERGE-BOT: (v828-16531559)

[CL 16577575 by graham wihlidal in ue5-main branch]
2021-06-07 16:55:33 -04:00
Ola Olsson
002e8128ae Basic shader check implementation that (on SM6) just puts the line number in the payload (line/file/text is future work)
- Adds macros check, checkBufferAccess and checkStructuredBufferAccess, along with Slow-suffixed equivalents
 - A new cvar 'r.Shader.CheckLevel' which defaults to 1 (enable check but not Slow). Thus be careful when using check, if unsure use checkSlow!
 - The cvar controls macros DO_CHECK=0 and DO_GUARD_SLOW=0 that mirrow the ones in host code.
 - Note that SM6 version only works for CS and PS.

#rb charles.derousiers
#preflight 60be56fc1e21b4000177f07b

[CL 16576687 by Ola Olsson in ue5-main branch]
2021-06-07 16:16:49 -04:00
Jian Ru
13d2d6e79e Batch BuildRenderingCommands from major mesh passes inside the main render function
#jira UE-117281
#rb ola.olsson, zach.bethel

[CL 16572282 by Jian Ru in ue5-main branch]
2021-06-07 12:19:06 -04:00
graham wihlidal
c3bda99324 Fix LWC issues with FRenderTransform
#fyi rune.stubbe, zak.middleton

[CL 16561641 by graham wihlidal in ue5-main branch]
2021-06-04 15:39:10 -04:00
graham wihlidal
c850a02c69 Implemented a new WIP type called FRenderTransform that (for now) represents instance transforms as a float 4x3 matrix - in the future we expect a much tighter per-instance encoding (for example: 12bytes for position, 4bytes for rotation, 6bytes for scale), so this type can be optimized in that direction. Other than saving hundreds of MB in *heavy* instance scenes, faster updates/uploads, etc.. this type could be used to represent a transform that stays 32bit w/ a rebase offset. Passing around ambiguous FVector and FMatrix data is bound to get us into trouble, whereas a concrete type we can reason about for transforms in render-only code makes a good deal of sense.
This change is another basis for more instance data and GPUScene improvements coming down the pipe.

#rb jason.nadro, krzysztof.narkowicz, zach.bethel, zak.middleton, rune.stubbe, ben.woodhouse
[FYI] brian.karis, ola.olsson
#preflight 60b9608d0249c300016598de


#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16555619
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16555914 by graham wihlidal in ue5-main branch]
2021-06-03 21:10:11 -04:00
rune stubbe
49dab7faa0 Added UAVOverlap to UnifiedBuffer MemcpyResource to fix RHI validation errors.
#ROBOMERGE-SOURCE: CL 16547260
#ROBOMERGE-BOT: (v828-16531559)

[CL 16547263 by rune stubbe in ue5-main branch]
2021-06-03 10:26:59 -04:00
sebastien lussier
03cf814e44 AllowDebugViewModes() now returns true if running a commandlet with -AllowCommandletRendering
#rb jeanfrancois.dube


#ROBOMERGE-SOURCE: CL 16546760
#ROBOMERGE-BOT: (v828-16531559)

[CL 16546788 by sebastien lussier in ue5-main branch]
2021-06-03 09:39:21 -04:00
zach bethel
f30bf425f3 Fix for assert when readback resource is being used in a copy destination state.
#rb none

[CL 16523954 by zach bethel in ue5-main branch]
2021-06-01 17:52:32 -04:00
zach bethel
db4d19f641 Fix for culled RDG uniform buffer being created.
#rb andrew.lauritzen

[CL 16523561 by zach bethel in ue5-main branch]
2021-06-01 17:25:18 -04:00
Arne Schober
a3c4f5230f U5 - moving the flush from before FlushRHIThreadFlushResources to after FlushRHIThreadFlushResources resulted in the "removal" of the quiescent state of the PipelineStateCache as now parallel RT commands were still able to run while we handle the PSO cache deletions. Unfortunately we now have to double flush (before and after) for some GT related flush cases, but as we try to remove flushes in general this might be acceptable until we find a better solution.
#jira UE-116592
#RB zach.bethel

[CL 16520718 by Arne Schober in ue5-main branch]
2021-06-01 15:37:22 -04:00
Lukas Hermanns
b5aafce030 Dump preprocessed shader source in log on D3DCompile exception.
#rb Rolando.Caloca
#fyi Michal.Valient, Mihnea.Balta, Luke.Thatcher, Arciel.Rekman, Chris.Bunner
#jira UE-114967
#rnx

[CL 16518546 by Lukas Hermanns in ue5-main branch]
2021-06-01 14:24:07 -04:00
zach bethel
0658cc1c17 Removed ensure for RDG finalized resources being accessed on async compute. Needs to handle read-only resources.
#rb none

[CL 16517080 by zach bethel in ue5-main branch]
2021-06-01 13:22:44 -04:00
dmytro vovk
e9ecfd141a Fixed OGL RHI thread ownership task tag scope
#rb none
#jira none

[CL 16507573 by dmytro vovk in ue5-main branch]
2021-05-31 00:32:31 -04:00
dmytro vovk
481f73da89 Fixed a crash in OGL RHIAcquireThreadOwnership
#codereview Dmitriy.Dyomin
#jira none

[CL 16497719 by dmytro vovk in ue5-main branch]
2021-05-27 23:06:20 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
zach bethel
c8cd80f396 Converted SetShaderUniformBufferImmediate to local uniform buffers to move creation off the render thread. Removed uses of RHICommandListImmediate. Moved local uniform buffer functions onto the compute command list.
[CL 16478490 by zach bethel in ue5-main branch]
2021-05-26 20:00:20 -04:00
graham wihlidal
10d53c644f Large primitive data refactor
--
Repacked prim data (removes 8x float32)
Implemented builder pattern for primitive uniform shader parameters
Various cleanup, optimizations, improvements - all forming a basis for subsequent refactors and optimizations
Derive calculations like lighting channel mask, per object gbuffer data, and determinant sign bit on the GPU now, instead of wasting buffer space on it.
Removed LPV bias (unused)

#rb jason.nadro, kevin.ortegren, zach.bethel, krzysztof.narkowicz
#[fyi] brian.karis

#ushell-cherrypick of 16474697 by graham.wihlidal
#ushell-cherrypick of 16476806 by graham.wihlidal
#ushell-cherrypick of 16477587 by graham.wihlidal

[CL 16477749 by graham wihlidal in ue5-main branch]
2021-05-26 19:03:46 -04:00
Steve Robb
1f3fe8c9ac Some ANSICHAR/UTF8CHAR cast fixes for upcoming changes to StringConv.h.
#rb none
#jira none

[CL 16469364 by Steve Robb in ue5-main branch]
2021-05-26 10:45:12 -04:00
zach bethel
2ab8c34577 Replaced FRDGBufferUploader with internal RDG upload. Removes several transitions and passes and removes immediate command list passes from the graph.
#rb jian.ru

[CL 16459303 by zach bethel in ue5-main branch]
2021-05-25 20:46:17 -04:00