Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore
tiago costa 71867d833d Refactored management of evicted ray tracing geometry.
Context:
- Evicted FRayTracingGeometry maintained the StreamedIn flag, which was later used in MakeResident(...) to recreate the geometry as-if it was streamed-in.
- While this was valid on PC since ray tracing geometry for streamed-in meshes is simply built at runtime, on platforms that support offline built BLAS this code path didn't handle loading the offline data (instead the BLAS ended up being built at runtime like on PC).

Changes:
- Refactored some branches out of FRayTracingGeometry::InitRHIForStreaming(...)/ReleaseRHIForStreaming(...) and moved them higher level where more context is available to avoid unexpected state simply being ignored.
- Evicting a streamed-in ray tracing geometry clears the StreamedIn and Valid flags, and sets Initializer.Type back to StreamingDestination.
- MakeResident() will simply create the RHI object without special handling for streamed-in ray tracing geometries.
- High level logic that calls FRayTracingGeometry::MakeResident(...) (currently FRayTracingGeometryManager) is responsible for handling the streaming-in of FRayTracingGeometry that requires it (ie: building BLAS at runtime, or streaming offline data as necessary).
- When ray tracing is toggled on, make all registered geometries resident and kick-off streaming requests as necessary.

#rb aleksander.netzel

[CL 34365484 by tiago costa in ue5-main branch]
2024-06-14 04:16:57 -04:00
..
2024-06-13 17:59:13 -04:00