Commit Graph

143 Commits

Author SHA1 Message Date
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jeremy moore
af02947e11 Fix race condition when creating geometry collection scene proxy for nanite. Moved some state caching from the constructor, which isn't guaranteed to be called after render resources are initialized, to CreateRenderThreadResources which is.
#rb cedric.caillaud
#jira UE-202208

[CL 30211075 by jeremy moore in ue5-main branch]
2023-12-08 10:43:52 -05:00
titouan deslandes
2a57b8f063 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud

[CL 29289224 by titouan deslandes in ue5-main branch]
2023-10-31 16:28:26 -04:00
michael lentine
d3ed2bc54f Undo //Fortnite/Release-28.00/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/... changelist 29242678
#rb none

[CL 29256090 by michael lentine in ue5-main branch]
2023-10-30 18:49:35 -04:00
titouan deslandes
bad8f30386 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud, vincent.robert, Benn.Gallagher

[CL 29246315 by titouan deslandes in ue5-main branch]
2023-10-30 15:57:51 -04:00
ola olsson
e5f34a1d9c ISM Renderer Data refactor, phase 1.
- Removed old vertex-attribute centered buffers & useless translation code & replace with GPU-scene centric data
 - Made the instance data persistent over scene proxy re-creates.
 - Tracks per-instance data changes in the ISM & implement delta updates, remove need to call "MarkRenderStateDirty" for most instance updates
 - Added preliminary ID-based interface for ISM such that users can forego needing to match the internals (e.g., remove swap, required when using indices).
 - Unified the instance data use in the renderer (removed mix of old & new buffers and processing sites) - all code now sees orthogonalized transforms, the same as is in GPU-Scene.
 - Added FInstanceSceneDataBuffers and moved instance data buffer arrays to that from the Primitive proxy
 - Added FISMInstanceDataManager, which is responsible for tracking changes & dispatching updates. The ISMC owns one of these.
 - Instance data update tasks are async and waits are only done when needed, e.g., for GPU-scene update moving this off RT and later in the frame.
 - Added FInstanceDataSceneProxy, which is the owner of the scene data buffers and is updated by the manager by way if a shared reference with the primitive proxy.
 - Removed FPerInstanceRenderData, ISMC::PerInstanceRenderData
 - Removed FInstanceUpdateCmdBuffer
 - Lumen, GPUScene, SceneCulling, RT, DF all now retrieve data from FInstanceSceneDataBuffers rather than a mix of previous buffers. All now use the primitive-relative space.
 - Geometry Collection & Spline Mesh now manage FInstanceSceneDataBuffers, since they manipulate instance data in one way or another.
 - Mass: contained re-implementations of significant internals of ISMC, converted to ID-based interface
 - PCG: minor changes to avoid touching ISM internals.

#jira UE-191955,PLAY-11918
#rb jamie.hayes,jeremy.moore,jonathan.bard,krzysztof.narkowicz,mieszko.zielinski,julien.lheureux,zach.bethel,aleksander.netzel,yuriy.odonnell

[CL 28371398 by ola olsson in ue5-main branch]
2023-10-02 05:22:58 -04:00
zach bethel
41011faffa Fixed geometry collection to run on the scene pipe and defer dynamic data until the proxy is fully created.
[CL 28209499 by zach bethel in ue5-main branch]
2023-09-25 18:27:54 -04:00
cedric caillaud
d728613dd5 Geometry collection : fix assert to not trigger is nanite material is masked
#rb trivial
[FYI] jeremy.moore

[CL 27917845 by cedric caillaud in ue5-main branch]
2023-09-15 11:49:08 -04:00
cedric caillaud
c63cd43ce7 Geometry collection : update code to support masked materials for nanite code path
#rb jeremy.moore

[CL 27819971 by cedric caillaud in ue5-main branch]
2023-09-12 22:48:09 -04:00
zach bethel
cdb7826011 Added scene render command pipe which moves all scene commands to run asynchronously.
- Create / Destroy render thread resources is now deferred until scene update and runs async.
 - Added bConstrainToRenderThread option to FPrimitiveSceneProxy, which controls whether the scene pipe is used for proxy virtual function calls.

#rb krzysztof.narkowicz, christopher.waters

[CL 27799388 by zach bethel in ue5-main branch]
2023-09-12 13:46:57 -04:00
zach bethel
a2c7d0ff1b Refactored OnTransformChanged to take an RHI command list so that it can be moved off the render thread.
[CL 26674727 by zach bethel in ue5-main branch]
2023-07-28 11:29:43 -04:00
zach bethel
6cf24de219 Refactored CreateRenderThreadResources to use a command list.
#jira none

[CL 26273878 by zach bethel in ue5-main branch]
2023-06-27 18:31:41 -04:00
zach bethel
61a256b156 More command list conversions. Streaming buffers, vertex factories, and TUniformBufferRef.
[CL 26217320 by zach bethel in ue5-main branch]
2023-06-23 16:03:17 -04:00
zach bethel
aa1b0c680f Deprecated non-command list RHI methods.
- RHICreate{Vertex, Index, Structured}Buffer
 - RHICreate{ShaderResource, UnorderedAccess}View
 - RHIUpdateUniformBuffer
 - Various initialization / locking methods for helper buffer types in RHIUtilities.h

The goal is to continue to force resource creation through command lists to avoid surprises with moving things off the render thread.

#rb christopher.waters

[CL 26183242 by zach bethel in ue5-main branch]
2023-06-22 11:08:27 -04:00
zach bethel
a7a9029b20 Deprecated InitRHI() in favor of InitRHI(FRHICommandListBase&).
#rb mihnea.balta, luke.thatcher, christopher.waters

[CL 26097009 by zach bethel in ue5-main branch]
2023-06-19 13:56:56 -04:00
zach bethel
a9a5fa39db Deprecated non-command list variant of InitResource and UpdateResource. Patched the engine to pass command lists through. Follow-up CL's will refactor individual locations to thread command lists through the various callstacks, but that was done very judiciously in this CL to reduce risk.
#rb mihnea.balta, christopher.waters

[CL 25953623 by zach bethel in ue5-main branch]
2023-06-13 11:46:40 -04:00
graham wihlidal
f44e4131c5 Changed Nanite::FResources member on static mesh render to an abstracted TPimplPtr<> to fully decouple NaniteResources.h from StaticMeshResources.h, avoiding costly full engine rebuilds whenever we iterate on Nanite, and provide us a mechanism going forward to move more of our API private.
#rb brian.karis, rune.stubbe
#fyi christopher.waters, juan.canada, yuriy.odonnell, henrik.karlsson
#preflight 6470360127390642751d5d60

[CL 25638055 by graham wihlidal in ue5-main branch]
2023-05-26 00:55:23 -04:00
tiago costa
01762cd124 Nanite RayTracing: Allocate auxiliary data staging buffer based on number of streamed clusters instead of number of total clusters
- added new runtime field (NumStreamedClusters) to Nanite::FResources
- modified logic in Nanite::FStreamingManager to update number of streamted clusters when pages are installed/uninstalled.
- modified NaniteStreamOut to output number of clusters to be able to check for incorrect count on CPU side.
- On CitySample, peak NaniteRayTracing.StagingAuxiliaryDataBuffer size is reduced from close to 1GB to about 200MB.

#rb rune.stubbe
#preflight 646e3399f85111e06ca30efa

[CL 25607114 by tiago costa in ue5-main branch]
2023-05-24 13:11:15 -04:00
tim doerries
ad5594d9b4 Fix for crash when applying a SLW material onto a Nanite mesh.
#rb graham.wihlidal
#rnx
#preflight 6407883c8c0039bbf7d32de7

[CL 24545925 by tim doerries in ue5-main branch]
2023-03-07 14:44:01 -05:00
Jeremy Moore
3a27764101 #jira UE-178300
Fix crash in FNaniteGeometryCollectionSceneProxy creation.
Issue seems to have been from bad merge of work in other stream.
#preflight 63f905fac35a141980d6a86c

[CL 24405393 by Jeremy Moore in ue5-main branch]
2023-02-24 13:59:56 -05:00
jeremy moore
3d36a729fd Update render data when resetting geometry collection asset in fracture editor.
Fixes crash caused by scene proxy recreating without the required render data update.
#preflight 63efee4713586f2c103e2673

[CL 24295291 by jeremy moore in ue5-main branch]
2023-02-17 19:39:56 -05:00
Jeremy Moore
ec6e0bc61d Fix for non unity build.
#preflight skip

[CL 24276185 by Jeremy Moore in ue5-main branch]
2023-02-16 21:52:00 -05:00
jeremy moore
9b2c32632a Fix merge issues
[CL 24261140 by jeremy moore in ue5-main branch]
2023-02-16 12:41:39 -05:00
jeremy moore
1cae9c2d97 Move all immutable geometry collection rendering data into the geometry collection asset.
This is built as part of geometry collection DDC contents.
Reworked scene proxy to use this data. Some big changes there:
* Tidied up hit proxy code so that all hit proxy clients use the same path.
* Removing of internal faces are now handled without an additional index buffer by always storing internal faces at the end of a section and providing different section descriptions for including internal faces.
* Dynamic geometry hiding in editor is now done by zeroing transforms instead of rebuilding the index buffer.
#rb cedric.caillaud
#preflight 63edc2e55c7bd278c11efe51

[CL 24261113 by jeremy moore in ue5-main branch]
2023-02-16 12:40:53 -05:00
vincent robert
a7dc3bb763 Decrease Constant Data memory
#rb cedric.caillaud
#preflight 63e5190683340ac6cbf0b1ff

[CL 24106141 by vincent robert in ue5-main branch]
2023-02-09 16:18:01 -05:00