5#if RHI_NEW_GPU_PROFILER
35 StopQuery = FRealtimeGPUProfiler::Get()->PopEvent();
39inline FRDGScope_GPU::~FRDGScope_GPU()
113 Node->SetParent(
State.CurrentBreadcrumbRef);
114 State.CurrentBreadcrumbRef = Node;
115 Node->TraceBeginCPU();
117 if (!
State.ScopeState.bImmediate)
120 State.LocalBreadcrumbList.Append(Node);
127 #if WITH_RHI_BREADCRUMBS
131 State.CurrentBreadcrumbRef = Node->GetParent();
138template <
typename TScopeType>
139template <
typename...
TArgs>
147 State.ScopeState.Mask |= FRDGScope::GetTypeMask<TScopeType>();
150 State.ScopeState.Current = Scope;
154 if (State.ScopeState.bImmediate)
156 Scope->
BeginCPU(State.RHICmdList,
false);
161template <
typename TScopeType>
166 if (State.ScopeState.bImmediate)
168 Scope->EndGPU(State.RHICmdList);
169 Scope->EndCPU(State.RHICmdList,
false);
172 Scope->ImmediateEnd(State);
174 State.ScopeState.Mask &= ~(FRDGScope::GetTypeMask<TScopeType>());
175 State.ScopeState.Current = State.ScopeState.Current->Parent;
179template <
typename TScopeType>
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
constexpr bool EnumHasAnyFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:35
RENDERCORE_API bool AreGPUStatsEnabled()
ERDGScopeFlags
Definition RenderGraphEvent.h:74
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition NameTypes.h:617
Definition RenderGraphEvent.h:580
bool ShouldAllocScope(TOptional< TRDGEventScopeGuard< TScopeType > > const &, ERDGScopeFlags Flags) const
Definition RenderGraphEvent.inl:180
struct FRDGScopeState::FState ScopeState
void Emplace(TArgs &&... Args)
Definition RenderGraphEvent.h:259
ERHIPipeline GetPipeline() const
Definition RHICommandList.h:675
FRHICommandListImmediate & GetAsImmediate()
Definition RHICommandList.inl:21
Definition RHICommandList.h:3819
Definition RHICommandList.h:2735
Definition RenderGraphEvent.h:329
~TRDGEventScopeGuard()
Definition RenderGraphEvent.inl:162
Category
Definition DiffResults.h:63
State
Definition PacketHandler.h:88
uint32 Mask
Definition RenderGraphEvent.h:587
static constexpr ERDGScopeMode const ScopeMode
Definition RenderGraphEvent.h:593
Definition RenderGraphEvent.h:236
void BeginCPU(FRHIComputeCommandList &RHICmdList, bool bPreScope)
Definition RenderGraphEvent.h:316
void BeginGPU(FRHIComputeCommandList &RHICmdList)
Definition RenderGraphEvent.h:317
FStorage Impl
Definition RenderGraphEvent.h:298
Definition RHIStats.h:110
Definition Optional.h:131
Definition LightweightStats.h:416