Navigation
API > API/Plugins > API/Plugins/PCG
| Name | UPCGComputeKernel |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Compute/PCGComputeKernel.h |
| Include Path | #include "Compute/PCGComputeKernel.h" |
Syntax
UCLASS (MinimalAPI, Abstract)
class UPCGComputeKernel : public UComputeKernel
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UComputeKernel → UPCGComputeKernel
Derived Classes
UPCGComputeKernel derived class hierarchy
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInitialized | bool | Compute/PCGComputeKernel.h | ||
| CachedOverridableParams | TArray< FPCGKernelOverridableParam > | Overridable params supported by this kernel, cached during compilation. | Compute/PCGComputeKernel.h | |
| InternalPinLabels | TSet< FName > | Compute/PCGComputeKernel.h | ||
| KernelIndex | int32 | Index into kernels array on owning compute graph. | Compute/PCGComputeKernel.h | |
| PCGKernelFlags | EPCGComputeKernelFlags | Compute/PCGComputeKernel.h | ||
| ResolvedSettings | TObjectPtr< const UPCGSettings > | Compute/PCGComputeKernel.h | ||
| SettingsPath | TSoftObjectPtr< const UPCGSettings > | Compute/PCGComputeKernel.h | ||
| StaticLogEntries | TArray< FPCGKernelLogEntry > | @todo_pcg: These are a bit of a hack to avoid supporting static/compilation logging in PCGNodeVisualLogs.h | Compute/PCGComputeKernel.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddInternalPin
(
FName InPinLabel |
Mark a pin as being internal to the kernel graph. This means it is not on the CPU/GPU boundary. | Compute/PCGComputeKernel.h | |
| Add any strings emitted by this node that are known statically at compile time. | Compute/PCGComputeKernel.h | ||
virtual bool AreKernelSettingsValid
(
FPCGContext* InContext |
Performs settings validation and returns true if this node is suitable for execution. | Compute/PCGComputeKernel.h | |
void ComputeDataDescFromPinProperties
(
const FPCGPinPropertiesGPU& OutputPinProps, |
Helper to compute data descriptions when data is entirely determined by pin properties. | Compute/PCGComputeKernel.h | |
virtual TSharedPtr< const FPCGDataCollectionDesc > ComputeOutputBindingDataDesc
(
FName InOutputPinLabel, |
Compute a description of data that will be output from pin InOutputPinLabel. | Compute/PCGComputeKernel.h | |
virtual int ComputeThreadCount
(
const UPCGDataBinding* Binding |
Compute how many threads should be dispatched to execute this node on the GPU. | Compute/PCGComputeKernel.h | |
virtual void CreateAdditionalInputDataInterfaces
(
FPCGGPUCompilationContext& InOutContext, |
Create additional input data interfaces to marshal any required input data. | Compute/PCGComputeKernel.h | |
virtual void CreateAdditionalOutputDataInterfaces
(
FPCGGPUCompilationContext& InOutContext, |
Create additional output data interfaces to marshal any required output data. | Compute/PCGComputeKernel.h | |
virtual UPCGComputeDataInterface * CreateOutputPinDataInterface
(
const PCGComputeHelpers::FCreateDataInterfaceParams& InParams |
Create a data interface for the given output pin. | Compute/PCGComputeKernel.h | |
virtual bool DoesOutputPinRequireZeroInitialization
(
FName InOutputPinLabel |
Initialize all buffer data to 0. | Compute/PCGComputeKernel.h | |
virtual void GatherAdditionalSources
(
TArray< TObjectPtr< class UComputeSource > >& OutAdditionalSources |
Gathers additional compute sources referenced by this kernel. | Compute/PCGComputeKernel.h | |
const TArray< FPCGKernelOverridableParam > & GetCachedOverridableParams() |
Compute/PCGComputeKernel.h | ||
virtual FString GetCookedSource
(
FPCGGPUCompilationContext& InOutContext |
Produces the node specific portion of kernel shader source text, including the main entry point. | Compute/PCGComputeKernel.h | |
| Get any data labels that are used statically by this node. | Compute/PCGComputeKernel.h | ||
virtual uint32 GetElementCountMultiplier
(
FName InOutputPinLabel |
Multiplier to be applied to the element count of each output data. | Compute/PCGComputeKernel.h | |
virtual FString GetEntryPoint () |
Get the name of the main kernel function in the source. | Compute/PCGComputeKernel.h | |
virtual void GetInputPins
(
TArray< FPCGPinProperties >& OutPins |
Compute/PCGComputeKernel.h | ||
void GetInputPinsAndOverridablePins
(
TArray< FPCGPinProperties >& OutPins |
Return the concatenation of GetInputPins() and GetOverridableParamPins(). | Compute/PCGComputeKernel.h | |
virtual void GetKernelAttributeKeys
(
TArray< FPCGKernelAttributeKey >& OutKeys |
Get all the attributes read or written by this node for which we know the name and type statically. | Compute/PCGComputeKernel.h | |
int32 GetKernelIndex() |
Get/set index of kernel in kernels array on owning compute graph. | Compute/PCGComputeKernel.h | |
bool GetLogDataDescriptions() |
Compute/PCGComputeKernel.h | ||
virtual void GetOutputPins
(
TArray< FPCGPinPropertiesGPU >& OutPins |
Compute/PCGComputeKernel.h | ||
virtual const UPCGSettings * GetSettings() |
Gets settings for node associated with this kernel, if any. | Compute/PCGComputeKernel.h | |
virtual const TCHAR * GetSourceFilePath() |
Get the virtual file path of the shader source file for this kernel. | Compute/PCGComputeKernel.h | |
virtual uint32 GetThreadCountMultiplier() |
Get multiplier to be applied to the dispatched thread count. | Compute/PCGComputeKernel.h | |
bool HasStaticValidationErrors() |
Compute/PCGComputeKernel.h | ||
void Initialize
(
const FPCGComputeKernelParams& InParams |
Initialize kernel. Editor only as shader compilation only available in editor. | Compute/PCGComputeKernel.h | |
virtual bool IsKernelDataValid
(
FPCGContext* InContext |
Performs data validation and returns true if this node is suitable for deployment to the GPU. | Compute/PCGComputeKernel.h | |
bool IsPinInternal
(
FName InPinLabel |
Whether the pin matching the given label should be eligible for inspect/debug. | Compute/PCGComputeKernel.h | |
void SetKernelIndex
(
int32 InKernelIndex |
Compute/PCGComputeKernel.h | ||
virtual bool SplitGraphAtInput
(
FName InPinLabel |
Whether compute graphs should be split at this input pin. Useful for overridable parameters. | Compute/PCGComputeKernel.h | |
virtual bool SplitGraphAtOutput () |
Whether compute graphs should be split at the output of this node. | Compute/PCGComputeKernel.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddStaticLogEntry
(
ArgsType&&... Args |
Compute/PCGComputeKernel.h | ||
bool AreInputEdgesValid
(
TArray< FPCGKernelLogEntry >& OutLogEntries |
Validate input edges, for example checking connected pin types are compatible. | Compute/PCGComputeKernel.h | |
void GetOverridableParamPins
(
TArray< FPCGPinProperties >& OutPins |
Collects all param pins which are overridable on the GPU. | Compute/PCGComputeKernel.h | |
virtual void InitializeInternal() |
Implement to do any additional initialization specific to your kernel. | Compute/PCGComputeKernel.h | |
virtual bool PerformStaticValidation () |
Performs validation on compile time information (e.g. Node, Settings, etc.). | Compute/PCGComputeKernel.h | |
bool ValidatePCGNode
(
TArray< FPCGKernelLogEntry >& OutLogEntries |
Do any validation of the PCG node. Returns true if node is valid and GPU execution can proceed. | Compute/PCGComputeKernel.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Compute/PCGComputeKernel.h |