UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RenderGraphValidation.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6#include "Containers/Map.h"
7#include "Containers/Set.h"
9#include "HAL/Platform.h"
10#include "RHI.h"
13#include "RenderGraphPass.h"
15
18class FRDGEventName;
19class FRDGPass;
22template <typename ReferencedType> class TRefCountPtr;
23
24#if RDG_ENABLE_DEBUG
25
41{
42public:
46
55
64
67 const TCHAR* Name,
69
72 const TCHAR* Name,
74
77
83
85
89
92
101
105
109
112
115
117
119
122
124
127
129 {
130 bParallelExecuteEnabled = bInParallelExecuteEnabled;
131 }
132
133private:
134 void ValidateCreateViewableResource(FRDGViewableResource* Resource);
135 void ValidateCreateResource(FRDGResourceRef Resource);
136 void ValidateExtractResource(FRDGViewableResource* Resource);
137
138 FRDGAllocator& Allocator;
139
142
144 bool bHasExecuted = false;
145 bool bHasExecuteBegun = false;
146
147 bool bParallelExecuteEnabled;
148
149 void ExecuteGuard(const TCHAR* Operation, const TCHAR* ResourceName);
150};
151
154{
155public:
158
161
164
165private:
166 struct FResourceMap
167 {
171 };
172
174
175 FBarrierBatchMap BatchMap;
176
177 const FRDGPassRegistry* Passes = nullptr;
178 const TCHAR* GraphName = nullptr;
179};
180
181#endif
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ERHIAccess
Definition RHIAccess.h:11
ERHIPipeline
Definition RHIPipeline.h:13
ERDGTextureFlags
Definition RenderGraphDefinitions.h:185
ERDGPassFlags
Definition RenderGraphDefinitions.h:128
ERDGBufferFlags
Definition RenderGraphDefinitions.h:163
Definition RenderGraphAllocator.h:24
Definition RenderGraphPass.h:108
Definition RenderGraphPass.h:185
Definition RenderGraphValidation.h:154
void ValidateBarrierBatchBegin(const FRDGPass *Pass, const FRDGBarrierBatchBegin &Batch)
FRDGBarrierValidation(const FRDGBarrierValidation &)=delete
void ValidateBarrierBatchEnd(const FRDGPass *Pass, const FRDGBarrierBatchEnd &Batch)
FRDGBarrierValidation(const FRDGPassRegistry *InPasses, const FRDGEventName &InGraphName)
Definition RenderGraphResources.h:1426
Definition RenderGraphResources.h:1452
Definition RenderGraphResources.h:1321
Definition RenderGraphEvent.h:38
Definition RenderGraphPass.h:217
Definition RenderGraphResources.h:131
Definition RenderGraphResources.h:747
Definition RenderGraphResources.h:839
Definition RenderGraphResources.h:867
Definition RenderGraphResources.h:905
Definition RenderGraphResources.h:571
Definition RenderGraphResources.h:193
Definition RenderGraphValidation.h:41
RENDERCORE_API void ValidateCreateUniformBuffer(FRDGUniformBufferRef UniformBuffer)
RENDERCORE_API void ValidateExternalAccess(FRDGViewableResource *Resource, ERHIAccess Access, const FRDGPass *Pass)
RENDERCORE_API void ValidateCreateBuffer(FRDGBufferRef Buffer)
RENDERCORE_API ~FRDGUserValidation()
RENDERCORE_API void ValidateRegisterExternalTexture(FRDGTextureRef Texture)
FRDGUserValidation(const FRDGUserValidation &)=delete
RENDERCORE_API bool TryMarkForClobber(FRDGViewableResource *Resource) const
RENDERCORE_API void ValidateCreateUAV(const FRDGTextureUAVDesc &Desc)
RENDERCORE_API void ValidateAddPass(const FRDGEventName &Name, ERDGPassFlags Flags)
RENDERCORE_API void ValidateRegisterExternalTexture(const TRefCountPtr< IPooledRenderTarget > &ExternalPooledTexture, const TCHAR *Name, ERDGTextureFlags Flags)
RENDERCORE_API void ValidateExecutePassEnd(const FRDGPass *Pass)
RENDERCORE_API void ValidateRegisterExternalBuffer(FRDGBufferRef Buffer)
RENDERCORE_API void ValidateExecuteEnd()
RENDERCORE_API void ValidateUploadBuffer(FRDGBufferRef Buffer, const FRDGBufferInitialDataCallback &InitialDataCallback, const FRDGBufferInitialDataSizeCallback &InitialDataSizeCallback, const FRDGBufferInitialDataFreeCallback &InitialDataFreeCallback)
RENDERCORE_API void ValidateExecutePassBegin(const FRDGPass *Pass)
RENDERCORE_API void ValidateCreateSRV(FRDGTextureSRVRef SRV)
static RENDERCORE_API void SetAllowRHIAccess(const FRDGPass *Pass, bool bAllowAccess)
RENDERCORE_API void ValidateExtractBuffer(FRDGBufferRef Buffer, TRefCountPtr< FRDGPooledBuffer > *OutBufferPtr)
RENDERCORE_API void ValidateUseInternalAccessMode(FRDGViewableResource *Resaource)
RENDERCORE_API void ValidateUploadBuffer(FRDGBufferRef Buffer, const FRDGBufferInitialDataCallback &InitialDataCallback, const FRDGBufferInitialDataSizeCallback &InitialDataSizeCallback)
RENDERCORE_API void ValidateExtractTexture(FRDGTextureRef Texture, TRefCountPtr< IPooledRenderTarget > *OutTexturePtr)
RENDERCORE_API void ValidateCreateSRV(FRDGBufferSRVRef SRV)
RENDERCORE_API void ValidateCreateTexture(FRDGTextureRef Texture)
RENDERCORE_API void ValidateGetPooledBuffer(FRDGBufferRef Buffer) const
void SetParallelExecuteEnabled(bool bInParallelExecuteEnabled)
Definition RenderGraphValidation.h:128
RENDERCORE_API void ValidateSetAccessFinal(FRDGViewableResource *Resource, ERHIAccess AccessFinal)
RENDERCORE_API void ValidateCreateTexture(const FRDGTextureDesc &Desc, const TCHAR *Name, ERDGTextureFlags Flags)
RENDERCORE_API void ValidateUploadBuffer(FRDGBufferRef Buffer, const void *InitialData, uint64 InitialDataSize)
RENDERCORE_API void ValidateCreateBuffer(const FRDGBufferDesc &Desc, const TCHAR *Name, ERDGBufferFlags Flags)
RENDERCORE_API void ValidateUseExternalAccessMode(FRDGViewableResource *Resource, ERHIAccess ReadOnlyAccess, ERHIPipeline Pipelines)
RENDERCORE_API void ValidateRegisterExternalBuffer(const TRefCountPtr< FRDGPooledBuffer > &ExternalPooledBuffer, const TCHAR *Name, ERDGBufferFlags Flags)
RENDERCORE_API void ValidateAddSubresourceAccess(FRDGViewableResource *Resource, const FRDGSubresourceState &Subresource, ERHIAccess Access)
RENDERCORE_API void ValidateGetPooledTexture(FRDGTextureRef Texture) const
RENDERCORE_API void ValidateUploadBuffer(FRDGBufferRef Buffer, const FRDGBufferInitialDataFillCallback &InitialDataFillCallback)
FRDGUserValidation(FRDGAllocator &Allocator)
RENDERCORE_API void ValidateCreateSRV(const FRDGTextureSRVDesc &Desc)
RENDERCORE_API void ValidateCreateUAV(FRDGTextureUAVRef UAV)
RENDERCORE_API void ValidateConvertToExternalResource(FRDGViewableResource *Resource)
RENDERCORE_API void ValidateAddPass(const FRDGPass *Pass)
RENDERCORE_API void ValidateCreateUAV(const FRDGBufferUAVDesc &Desc)
RENDERCORE_API void ValidateCreateUAV(FRDGBufferUAVRef UAV)
RENDERCORE_API void ValidateAddPass(const void *ParameterStruct, const FShaderParametersMetadata *Metadata, const FRDGEventName &Name, ERDGPassFlags Flags)
RENDERCORE_API void ValidateExecuteBegin()
RENDERCORE_API void ValidateUploadBuffer(FRDGBufferRef Buffer, const void *InitialData, uint64 InitialDataSize, const FRDGBufferInitialDataFreeCallback &InitialDataFreeCallback)
RENDERCORE_API void ValidateCreateUniformBuffer(const void *ParameterStruct, const FShaderParametersMetadata *Metadata)
RENDERCORE_API void ValidateConvertToExternalUniformBuffer(FRDGUniformBuffer *UniformBuffer)
RENDERCORE_API void ValidateCreateSRV(const FRDGBufferSRVDesc &Desc)
RENDERCORE_API void ValidateCommitBuffer(FRDGBufferRef Buffer, uint64 CommitSizeInBytes)
Definition RenderGraphResources.h:291
Definition ShaderParameterMetadata.h:136
Definition UnrealString.h.inl:34
Definition RefCounting.h:454
Definition ContainerAllocationPolicies.h:1662
Definition RenderGraphResources.h:940
Definition RenderGraphResources.h:1122
Definition RenderGraphResources.h:1163
Definition RenderGraphResources.h:69
Definition RenderGraphDefinitions.h:627
Definition RendererInterface.h:494