UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISparseVolumeTextureStreamingManager.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7
9class FRDGBuilder;
10
11namespace UE
12{
13namespace SVT
14{
15
45
47{
48 None = 0,
49 Blocking = 1u << 0u, // Use blocking IO requests.
50 HasFrameRate = 1u << 1u, // The passed in FrameRate value can be used to more accurately predict bandwidth requirements.
51};
53
54// Interface for the SparseVolumeTexture streaming manager
56{
57public:
58 //~ Begin game thread functions.
61 // Request a frame to be streamed in.
62 // StreamingInstanceKey can be any arbitrary value that is suitable to keep track of the source of requests for a given SVT.
63 // This key is used internally to associate incoming requests with prior requests issued for the same SVT. A good value to pass here might be a hash of the pointer of the component the SVT is used within.
64 // FrameRate is an optional argument which helps to more accurately predict the required bandwidth when using non-blocking requests. EStreamingRequestFlags::HasFrameRate must be set for this.
65 // FrameIndex is of float type so that the fractional part can be used to better track the playback speed/direction.
66 // This function automatically also requests all higher mip levels and adds prefetch requests for upcoming frames.
68 // Issues a rendering command for updating the streaming manager. This is not normally needed, but is necessary in cases where blocking requests are required
69 // and the SVT is used in a rendering command (which is executed before the streaming manager would normally update). A call to this function is not needed when the SVT
70 // is used in a regular pass called from FDeferredShadingSceneRenderer::Render().
71 virtual void Update_GameThread() = 0;
72 //~ End game thread functions.
73
74 //~ Begin rendering thread functions.
76 // Begins updating the streaming manager. If r.SparseVolumeTexture.Streaming.AsyncThread is 1 and bUseAsyncThread is true, most of the updating work is done in another thread.
77 virtual void BeginAsyncUpdate(FRDGBuilder& GraphBuilder, bool bUseAsyncThread = true) = 0;
78 // Waits for the job started in BeginAsyncUpdate() to complete, issues GPU work and does some cleanup.
79 virtual void EndAsyncUpdate(FRDGBuilder& GraphBuilder) = 0;
80 // Returns a FStreamingDebugInfo useful for debugging streaming performance. All data is allocated on the passed in GraphBuilder.
81 virtual const FStreamingDebugInfo* GetStreamingDebugInfo(FRDGBuilder& GraphBuilder) const = 0;
82 //~ End rendering thread functions.
83
84 virtual ~IStreamingManager() = default;
85};
86
88
89}
90}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition RenderGraphBuilder.h:49
Definition ISparseVolumeTextureStreamingManager.h:56
virtual void Update_GameThread()=0
virtual void Request_GameThread(UStreamableSparseVolumeTexture *SparseVolumeTexture, uint32 StreamingInstanceKey, float FrameRate, float FrameIndex, float MipLevel, EStreamingRequestFlags Flags)=0
virtual ~IStreamingManager()=default
virtual void EndAsyncUpdate(FRDGBuilder &GraphBuilder)=0
virtual void Remove_GameThread(UStreamableSparseVolumeTexture *SparseVolumeTexture)=0
virtual void Add_GameThread(UStreamableSparseVolumeTexture *SparseVolumeTexture)=0
virtual const FStreamingDebugInfo * GetStreamingDebugInfo(FRDGBuilder &GraphBuilder) const =0
virtual void BeginAsyncUpdate(FRDGBuilder &GraphBuilder, bool bUseAsyncThread=true)=0
virtual void Request(UStreamableSparseVolumeTexture *SparseVolumeTexture, uint32 StreamingInstanceKey, float FrameRate, float FrameIndex, float MipLevel, EStreamingRequestFlags Flags)=0
Definition SparseVolumeTexture.h:452
EStreamingRequestFlags
Definition ISparseVolumeTextureStreamingManager.h:47
IStreamingManager & GetStreamingManager()
Definition SparseVolumeTextureStreamingManager.cpp:128
Definition AdvancedWidgetsModule.cpp:13
Definition ISparseVolumeTextureStreamingManager.h:21
float AllocatedBandwidth
Definition ISparseVolumeTextureStreamingManager.h:26
float Frame
Definition ISparseVolumeTextureStreamingManager.h:23
uint32 Key
Definition ISparseVolumeTextureStreamingManager.h:22
float RequestedMip
Definition ISparseVolumeTextureStreamingManager.h:27
float InBudgetMip
Definition ISparseVolumeTextureStreamingManager.h:28
float RequestedBandwidth
Definition ISparseVolumeTextureStreamingManager.h:25
float FrameRate
Definition ISparseVolumeTextureStreamingManager.h:24
Definition ISparseVolumeTextureStreamingManager.h:19
const float * FrameResidencyPercentages
Definition ISparseVolumeTextureStreamingManager.h:32
const float * FrameStreamingPercentages
Definition ISparseVolumeTextureStreamingManager.h:33
int32 NumInstances
Definition ISparseVolumeTextureStreamingManager.h:36
int32 NumFrames
Definition ISparseVolumeTextureStreamingManager.h:35
FName AssetName
Definition ISparseVolumeTextureStreamingManager.h:31
const FInstance * Instances
Definition ISparseVolumeTextureStreamingManager.h:34
Definition ISparseVolumeTextureStreamingManager.h:17
float BandwidthLimit
Definition ISparseVolumeTextureStreamingManager.h:42
const FSVT * SVTs
Definition ISparseVolumeTextureStreamingManager.h:39
float BandwidthScale
Definition ISparseVolumeTextureStreamingManager.h:43
float RequestedBandwidth
Definition ISparseVolumeTextureStreamingManager.h:41
int32 NumSVTs
Definition ISparseVolumeTextureStreamingManager.h:40