Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/HLSLTree
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/HLSLTree/HLSLTreeEmit.h |
| Include | #include "HLSLTree/HLSLTreeEmit.h" |
Syntax
class FEmitContext
Remarks
Tracks shared state while emitting HLSL code
Variables
| Type | Name | Description | |
|---|---|---|---|
| FActiveStructFieldStack | ActiveStructFieldStack | ||
| FMemStackBase * | Allocator | ||
| bool | bCompiledShadingModels | ||
| bool | bMarkLiveValues | ||
| bool | bUseAnalyticDerivatives | ||
| bool | bUsesSkyAtmosphere | ||
| bool | bUsesSpeedTree | ||
| bool | bUsesSphericalParticleOpacity | ||
| bool | bUsesWorldPositionExcludingShaderOffsets | ||
| TMap< FConnectionKey, Shader::FType > | ConnectionMap | ||
| uint32 | CurrentBoolUniformOffset | ||
| uint32 | CurrentNumBoolComponents | ||
| TMap< FXxHash64, FCustomDataWrapper * > | CustomDataMap | ||
| uint32 | DynamicParticleParameterMask | ||
| TMap< FXxHash64, FEmitCustomHLSL > | EmitCustomHLSLMap | ||
| TMap< FXxHash64, FEmitShaderExpression * > | EmitExpressionMap | ||
| TMap< const FFunction *, FEmitShaderNode * > | EmitFunctionMap | ||
| TMap< FXxHash64, FEmitShaderExpression * > | EmitLocalPHIMap | ||
| TArray< FEmitShaderNode * > | EmitNodes | ||
| TMap< FXxHash64, FEmitShaderExpression * > | EmitPreshaderMap | ||
| TMap< const FScope *, FEmitScope * > | EmitScopeMap | ||
| TMap< FXxHash64, FEmitShaderExpression * > | EmitValueMap | ||
| FErrorHandlerInterface * | Errors | ||
| const FMaterial * | Material | TODO - Material values required for preshaders, need to decouple preshaders from material system Current plan is to implement support for externally registered preshader opcodes, and move the preshader opcodes related to material parameters into a separate module. | |
| FMaterialCompilationOutput * | MaterialCompilationOutput | ||
| const UMaterialInterface * | MaterialInterface | ||
| int32 | NumErrors | ||
| int32 | NumExpressionLocalPHIs | ||
| int32 | NumExpressionLocals | ||
| TArray< const FOwnedNode *, TInlineAllocator< 32 > > | OwnerStack | ||
| TMap< const FExpression *, FEmitScope * > | PrepareLocalPHIMap | ||
| TMap< FXxHash64, FPrepareValueResult * > | PrepareValueMap | ||
| TArray< const FPreshaderLocalPHIScope * > | PreshaderLocalPHIScopes | ||
| TArray< struct FPreshaderLoopScope * > | PreshaderLoopScopes | ||
| int32 | PreshaderStackPosition | ||
| TMap< FXxHash64, FRequestedType * > | RequestedTypeTracker | ||
| TMap< FMaterialParameterInfo, FMaterialParameterValue > | SeenStaticParameterValues | ||
| EShaderFrequency | ShaderFrequency | ||
| FTargetParameters | TargetParameters | ||
| const Shader::FStructTypeRegistry * | TypeRegistry | ||
| uint32 | UniformPreshaderOffset |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FEmitContext
(
FMemStackBase& InAllocator, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| T & | AcquireData () |
Finds or creates arbitrary data that's associated with this context. | |
| FEmitScope * | AcquireEmitScope
(
const FScope* Scope |
||
| FEmitScope * | AcquireEmitScopeWithParent
(
const FScope* Scope, |
||
| FEmitShaderExpression * | EmitCast
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitConstantZero
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitCustomHLSL
(
FEmitScope& Scope, |
FStringViews passed to this method are expected to reference persistent memory | |
| void | EmitDeclarationsCode
(
FStringBuilderBase& OutCode |
||
| FEmitShaderExpression * | EmitExpression
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitExpressionWithDependencies
(
FEmitScope& Scope, |
Generate a snippit of HLSL code, strings with identical contents will be deduplicated, and their dependencies will be merged | |
| FEmitShaderExpression * | EmitExpressionWithDependency
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitFormatStatementInternal
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitInlineExpression
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitInlineExpressionWithDependencies
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitInlineExpressionWithDependency
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitNestedScope
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitNestedScopes
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitNextScope
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitNextScopeWithDependency
(
FEmitScope& Scope, |
||
| FEmitShaderExpression * | EmitPreshaderOrConstant
(
FEmitScope& Scope, |
||
| void | EmitPreshaderScope
(
FEmitScope& EmitScope, |
||
| void | EmitPreshaderScope
(
const FScope* Scope, |
||
| FEmitShaderStatement * | EmitStatement
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitStatementWithDependencies
(
FEmitScope& Scope, |
||
| FEmitShaderStatement * | EmitStatementWithDependency
(
FEmitScope& Scope, |
||
| bool | Error
(
const StringType& InError |
||
| bool | Errorf
(
const FormatType& Format, |
||
| void | Finalize () |
||
| T & | FindData () |
||
| const T & | FindData () |
||
| FEmitScope * | FindEmitScope
(
const FScope* Scope |
||
| EExpressionEvaluation | GetEvaluation
(
const FExpression* Expression, |
||
| FPreparedType | GetPreparedType
(
const FExpression* Expression, |
||
| Shader::FType | GetResultType
(
const FExpression* Expression, |
||
| Shader::FType | GetTypeForPinColoring
(
const FExpression* Expression |
||
| FEmitShaderExpression * | InternalEmitExpression
(
FEmitScope& Scope, |
||
| FEmitScope * | InternalEmitScope
(
const FScope* Scope |
||
| FEmitShaderStatement * | InternalEmitStatement
(
FEmitScope& Scope, |
||
| bool | InternalError
(
FStringView ErrorMessage |
||
| FCustomDataWrapper * | InternalFindData
(
FXxHash64 Hash |
||
| FEmitScope * | InternalPrepareScope
(
FScope* Scope, |
||
| void | InternalRegisterData
(
FXxHash64 Hash, |
||
| TArrayView< FEmitShaderNode * > | MakeDependencies
(
T*& Dependency |
||
| void | MarkInputType
(
const FExpression* InExpression, |
||
| void | MarkScopeDead
(
FEmitScope& EmitParentScope, |
||
| void | MarkScopeEvaluation
(
FEmitScope& EmitParentScope, |
||
| FPreparedType | PrepareExpression
(
const FExpression* InExpression, |
||
| FEmitScope * | PrepareScope
(
FScope* Scope |
||
| FEmitScope * | PrepareScopeWithParent
(
FScope* Scope, |
||
| void |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FCustomDataWrapper | |||
| TCustomDataWrapper |