Navigation
API > API/Plugins > API/Plugins/ComputeFramework
Class representing a Compute Graph. This holds the basic topology of the graph and is responsible for linking Kernels with Data Interfaces and compiling the resulting shader code. Multiple Compute Graph asset types can derive from this to specialize the graph creation process. For example the Animation Deformer system provides a UI for creating UComputeGraph assets.
| Name | UComputeGraph |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ComputeFramework/Source/ComputeFramework/Public/ComputeFramework/ComputeGraph.h |
| Include Path | #include "ComputeFramework/ComputeGraph.h" |
Syntax
UCLASS (MinimalAPI)
class UComputeGraph : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UComputeGraph
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| ComputeFramework/ComputeGraph.h | |||
UComputeGraph
(
const FObjectInitializer& ObjectInitializer |
ComputeFramework/ComputeGraph.h | ||
UComputeGraph
(
FVTableHelper& Helper |
ComputeFramework/ComputeGraph.h |
Structs
| Name | Remarks |
|---|---|
| FComputeKernelResourceSet | Each kernel requires an associated FComputeKernelResource object containing the shader resources. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| KernelResourceIndicesPendingShaderCompilation | TSet< int32 > | Indices of kernels pending shader compilation | ComputeFramework/ComputeGraph.h | |
| KernelResources | TArray< FComputeKernelResourceSet > | Kernel resources stored with the same indexing as the KernelInvocations array. | ComputeFramework/ComputeGraph.h | |
| RenderProxy | FComputeGraphRenderProxy * | Render proxy that owns all render thread resources. | ComputeFramework/ComputeGraph.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CreateDataProviders
(
int32 InBindingIndex, |
Create UComputeDataProvider objects to match the current UComputeDataInterface objects and initialize them. | ComputeFramework/ComputeGraph.h | |
FComputeGraphRenderProxy const * GetRenderProxy() |
Get the render proxy which is a copy of all data required by the render thread. | ComputeFramework/ComputeGraph.h | |
bool HasKernelResourcesPendingShaderCompilation() |
Shader compilations triggered by UpdateResources() are async, This checks if all kernel resources are ready. | ComputeFramework/ComputeGraph.h | |
void InitializeDataProviders
(
int32 InBindingIndex, |
Initialize the data providers. | ComputeFramework/ComputeGraph.h | |
virtual void OnKernelCompilationComplete
(
int32 InKernelIndex, |
Called each time that a single kernel shader compilation is completed. | ComputeFramework/ComputeGraph.h | |
void UpdateResources
(
bool bSync |
Call after changing the graph to build the graph resources for rendering. | ComputeFramework/ComputeGraph.h | |
bool ValidateGraph
(
FString* OutErrors |
Returns true if graph is valid. | ComputeFramework/ComputeGraph.h | |
bool ValidateProviders
(
TArray< TObjectPtr< UComputeDataProvider > > const& DataProviders |
Returns true if there is a valid DataProvider entry for each of our DataInterfaces. | ComputeFramework/ComputeGraph.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginCacheForCookedPlatformData
(
ITargetPlatform const* TargetPlatform |
ComputeFramework/ComputeGraph.h | ||
void BeginDestroy() |
ComputeFramework/ComputeGraph.h | ||
void ClearAllCachedCookedPlatformData() |
ComputeFramework/ComputeGraph.h | ||
void ClearCachedCookedPlatformData
(
ITargetPlatform const* TargetPlatform |
ComputeFramework/ComputeGraph.h | ||
bool IsCachedCookedPlatformDataLoaded
(
ITargetPlatform const* TargetPlatform |
ComputeFramework/ComputeGraph.h | ||
void OnCookEvent
(
UE::Cook::ECookEvent CookEvent, |
ComputeFramework/ComputeGraph.h | ||
void PostLoad() |
ComputeFramework/ComputeGraph.h | ||
void Serialize
(
FArchive& Ar |
ComputeFramework/ComputeGraph.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CacheShadersForResource
(
EShaderPlatform ShaderPlatform, |
Cache shader resources for a specific compute kernel. | ComputeFramework/ComputeGraph.h |