Commit Graph

40 Commits

Author SHA1 Message Date
tiago costa
1785c5d403 Fix distance field streaming on builds WITH_EDITOR.
#rb per.larsson
#preflight 636e38719e3bea8079558310

[CL 23095806 by tiago costa in ue5-main branch]
2022-11-11 07:04:09 -05:00
tiago costa
884f3d3c8a Don't bind view uniform buffer to Global SDF update shaders
#rb none
#preflight 63610b91731604696a0975fc

[CL 22880212 by tiago costa in ue5-main branch]
2022-11-01 08:21:14 -04:00
Per Larsson
6f83a9b7d1 Distance Field - fix condition when logging I/O error
#rb none
#jira none
#preflight none
#rnx

[CL 22686923 by Per Larsson in ue5-main branch]
2022-10-21 07:19:24 -04:00
Per Larsson
f80984dc26 Refactored distance field streaming to use bulk data streaming API
#rb tiago.costa
#rnx
#jira none
#preflight 634d01495f008d633f903087

[CL 22558164 by Per Larsson in ue5-main branch]
2022-10-17 03:44:38 -04:00
zach bethel
f69b6fbc27 Fixed validation errors due to async compute distance field targets.
#jira UE-163453
#preflight 631faf4be07c4dc0b134f5e6

[CL 21985233 by zach bethel in ue5-main branch]
2022-09-13 12:31:35 -04:00
zach bethel
be43d2dba3 Fix for assert in distance field streaming async compute access.
#jira UE-155935
#preflight trivial

[CL 21732556 by zach bethel in ue5-main branch]
2022-08-31 19:36:44 -04:00
zach bethel
6815b1d071 Removed distance field async that was being immediately waited on. Removes a large render thread stall.
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 21438025 via CL 21438027 via CL 21438031 via CL 21438032 via CL 21438033
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v981-21435820)

[CL 21438348 by zach bethel in ue5-main branch]
2022-08-18 00:46:10 -04:00
tiago costa
5303bfd4aa Prevent crash when using forcing number of distance field mips
- If r.DistanceFields.Debug.ForceNumMips is set to a value higher than DistanceField::NumMips it caused a crash.
- Limit DebugForceNumMips to never exceed DistanceField::NumMips

#jira none
#rb none
#preflight 62d684331062f2e6302c4791
#robomerge FNMain

[CL 21160338 by tiago costa in ue5-main branch]
2022-07-19 06:32:18 -04:00
zach bethel
ac11396729 Fixed test and validation regressions due to RDG changes.
#preflight 6272a1f12f6d177be3c60a53
#jira UE-150908

[CL 20043535 by zach bethel in ue5-main branch]
2022-05-04 12:41:19 -04:00
zach bethel
16dcf5b313 Refactored Lumen and Distance Field buffers to RDG.
- Replaced FRW{Structured, ByteAddress}Buffer with TRefCountPtr<FRDGPooledBuffer>
 - Replaced ResizeResourceIfNeeded with Resize{Structured, ByteAddress}BufferIfNeeded.
 - Replaced FScatterUploadBuffer with FRDGScatterUploadBuffer.
 - Removed awkward copy of page table buffers now that scatters are on the RDG timeline.
 - Reduced number of uniform buffers created by consolidating within FLumenSceneFrameTemporaries.
 - Fixed up const-correctness of FLumenSceneFrameTemporaries to sanity check that resources were not being mutated later in the frame.
 - Reduced explicit view creations somewhat.
 - Distance fields needs an FDistanceFieldSceneFrameTemporaries to cache RDG resources, but I held off on this due to the number of files it would touch.

#rb krzyzstof.narkowicz, daniel.wright

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19921040 via CL 19922067 via CL 19922607
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19925590 by zach bethel in ue5-main branch]
2022-04-26 14:37:07 -04:00
zach bethel
10131e1285 Refactored RDG in preparation for UnifiedBuffer conversions.
- Refactord 'Finalized Access' feature into a more flexible 'External' vs. 'Internal' access mode per resource toggle.
      - Resources can transition between modes multiple times within the graph.
      - Supports async compute pipeline.
      - Supports queueing of requests to avoid back-to-back helper passes.
      - This feature is needed to support conversion of GPU scene buffers.

 - Deprecated the ReadOnly and ForceTracking resource flags and added a 'SkipTracking' flag instead.
      - Previous semantics were confusing and error prone.
      - New model requires a manual flag to tell RDG never to transition a resource.
      - This flag is used for read-only dummy resources as an optimization.

 - Renamed some of the auxiliary 'FinalizedResource' utilities since the name no longer matches the semantics.

#preflight 6266cc6d0634d0904ce4ba46

[CL 19904734 by zach bethel in ue5-main branch]
2022-04-25 13:00:12 -04:00
tiago costa
d3e0196bd2 Fix error compiling shaders sampling distance fields when using non-default Distance Field Offset Data Structure
- Shaders sampling mesh distance fields must define OFFSET_DATA_STRUCT according to r.DFShadowOffsetDataStructure.
- Also renamed cvar r.DFShadowOffsetDataStructure to r.DistanceFields.OffsetDataStructure since it applies to all techniques sampling mesh distance fields.

#preflight 626661771a71643e8b8b07df
#rb Krzysztof.Narkowicz
#jira none

[CL 19900311 by tiago costa in ue5-main branch]
2022-04-25 07:32:32 -04:00
zach bethel
a00b40ad3b Deprecated GetRenderTargetItem() from IPooledRenderTarget.
#preflight 624ddb30090236773a1a83e0
#rb luke.thatcher

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19655641 via CL 19655653 via CL 19655661
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19657582 by zach bethel in ue5-main branch]
2022-04-06 18:24:24 -04:00
jason hoerner
078ea856d8 UE5_MAIN: Multi-GPU crash, corruption, and DumpGPU fixes.
* Distance Field streaming GPU mask scope clean up, to avoid startup crash.  Added single high level FRHIGPUMask::All() scope in PrepareDistanceFieldScene, to avoid the need to set the mask in multiple lower level functions, and hopefully cover future modifications to the distance field scene code.  View dependent subset of the code is then masked to the view.  Validation asserts added in case code gets moved around in the future.
* Fixed bug when generating SRVs for structured buffers -- wasn't pointing the SRV to the correct GPU buffer.  Caused GPU hangs and all sorts of corrupted rendering.
* Fixed bug that RHICopyToResolveTarget wasn't using the correct GPU index.  Main symptom was DumpGPU being non-functional on the second GPU, but could cause other artifacts as well.

#jira none
#rnx
#rb christopher.waters chris.kulla
#preflight 624716e2b6084b9832597015

[CL 19591778 by jason hoerner in ue5-main branch]
2022-04-01 13:44:07 -04:00
tiago costa
f19cad0d3d Distance Field LWC support #2
- Compute wanted mips in translated world space.

#jira UE-143275
#rb none
#preflight 6220d0006530856a975bfbfb

[CL 19243336 by tiago costa in ue5-main branch]
2022-03-03 09:36:28 -05:00
tiago costa
28b6851641 Improve DistanceFields streaming CPU perf.
- Modified PendingThrottledOperations to be a TSet, avoiding expensive Remove operation. PendingThrottledOperations is appended to PendingAddOperations which is already a TSet, so order is not guaranteed anyway.
- Use RemoveAtSwap to remove completed requests from ReadRequests.

#preflight 621d27e5d815cc2f95f4f694
#rb none
#jira none
#fyi daniel.wright

[CL 19219566 by tiago costa in ue5-main branch]
2022-03-02 05:22:04 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
tiago costa
09ad19466e Fix readback not getting latest available data.
- Need to update index at each iteration.

#rb Rune.Stubbe, Krzysztof.Narkowicz
#preflight 61af9923b841b84301bab88f

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18396940 in //UE5/Release-5.0/... via CL 18396946
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18396958 by tiago costa in ue5-release-engine-test branch]
2021-12-07 13:37:50 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
tiago costa
8847d8387a Fix DistanceField asset data upload when LWC is enabled.
#jira none
#rb none
#preflight 6151908d59c66a0001fe6dc5

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 17628798 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17628811 by tiago costa in ue5-release-engine-test branch]
2021-09-27 06:59:26 -04:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
tiago costa
7b5c6e6ea8 Improve Distance Field rendering performance
- Reduce ALU, VGPR - move operations to CPU, reorganize asset data buffer.
- Added CSV stats to track atlas and indirection table size.
- DF shadow perf on heavy scenes improved by around 12% (3.75ms vs 4.3ms).

#rb daniel.wright
#jira UE-120168
#preflight 6144599b4778fa00018e49a6

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 17550410 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[bot1]: EMT

[CL 17550414 by tiago costa in ue5-release-engine-test branch]
2021-09-17 06:33:42 -04:00
johan torp
6d9cece365 Fix mismatching Malloc / delete
#rb paul.chipchase
#udn 00355521
#preflight 6139cdf84e83140001f58589

#ROBOMERGE-AUTHOR: johan.torp
#ROBOMERGE-SOURCE: CL 17470167 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17470183 by johan torp in ue5-release-engine-test branch]
2021-09-09 05:57:34 -04:00