![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ShaderParameterParser.h>
Classes | |
| struct | FParsedShaderParameter |
| struct | FPlatformConfiguration |
Static Public Member Functions | |
| static RENDERCORE_API EShaderParameterType | ParseAndRemoveBindlessParameterPrefix (FStringView &InName) |
| static RENDERCORE_API EShaderParameterType | ParseAndRemoveBindlessParameterPrefix (FString &InName) |
| static RENDERCORE_API bool | RemoveBindlessParameterPrefix (FString &InName) |
| static RENDERCORE_API FStringView | GetBindlessParameterPrefix (EShaderParameterType InShaderParameterType) |
Static Public Attributes | |
| static constexpr const TCHAR * | kBindlessSRVPrefix = TEXT("BindlessSRV_") |
| static constexpr const TCHAR * | kBindlessUAVPrefix = TEXT("BindlessUAV_") |
| static constexpr const TCHAR * | kBindlessSamplerPrefix = TEXT("BindlessSampler_") |
| static constexpr const TCHAR * | kBindlessSRVArrayPrefix = TEXT("SRVDescriptorHeap_") |
| static constexpr const TCHAR * | kBindlessUAVArrayPrefix = TEXT("UAVDescriptorHeap_") |
| static constexpr const TCHAR * | kBindlessSamplerArrayPrefix = TEXT("SamplerDescriptorHeap_") |
Protected Member Functions | |
| RENDERCORE_API EShaderParameterType | ParseParameterType (FStringView InType) |
| RENDERCORE_API bool | ParseParameters (const FShaderParametersMetadata *RootParametersStructure, TArray< FShaderCompilerError > &OutErrors) |
| RENDERCORE_API void | RemoveMovingParametersFromSource (FString &PreprocessedShaderSource) |
| RENDERCORE_API void | ApplyBindlessModifications (FString &PreprocessedShaderSource) |
| RENDERCORE_API bool | MoveShaderParametersToRootConstantBuffer (const FShaderParametersMetadata *RootParametersStructure, EShaderFrequency ShaderFrequency, FString &PreprocessedShaderSource) |
| RENDERCORE_API void | ExtractFileAndLine (int32 PragamLineoffset, int32 LineOffset, FString &OutFile, FString &OutLine) const |
| virtual RENDERCORE_API FString | GenerateBindlessParameterDeclaration (const FParsedShaderParameter &ParsedParameter) const |
Protected Attributes | |
| const FPlatformConfiguration & | PlatformConfiguration |
| FString | OriginalParsedShader |
| TMap< FString, FParsedShaderParameter > | ParsedParameters |
| bool | bBindlessEnabled = false |
| bool | bNeedToMoveToRootConstantBuffer = false |
| bool | bMovedLoosedParametersToRootConstantBuffer = false |
| bool | bModifiedShader = false |
Validates and moves all the shader loose data parameter defined in the root scope of the shader into the root uniform buffer.
|
delete |
| FShaderParameterParser::FShaderParameterParser | ( | const FPlatformConfiguration & | InPlatformConfiguration | ) |
|
virtualdefault |
|
protected |
Converts parsed parameters into their bindless forms.
|
inline |
|
protected |
|
inline |
Gets parsing information from a parameter binding name.
|
inline |
|
protectedvirtual |
Generates shader source code to declare a bindless resource or sampler (for automatic bindless conversion). May be overriden to allow custom implementations for different platforms.
|
static |
|
inline |
Gets file and line of the parameter in the shader source code.
|
protected |
Moves parsed parameters into the root constant buffer.
| bool FShaderParameterParser::ParseAndModify | ( | const FShaderCompilerInput & | CompilerInput, |
| TArray< FShaderCompilerError > & | OutErrors, | ||
| FString & | PreprocessedShaderSource | ||
| ) |
|
static |
|
static |
|
protected |
Parses the preprocessed shader code
|
protected |
|
static |
|
protected |
| void FShaderParameterParser::ValidateShaderParameterType | ( | const FShaderCompilerInput & | CompilerInput, |
| const FString & | ShaderBindingName, | ||
| int32 | ReflectionOffset, | ||
| int32 | ReflectionSize, | ||
| bool | bPlatformSupportsPrecisionModifier, | ||
| FShaderCompilerOutput & | CompilerOutput | ||
| ) | const |
Validates the shader parameter in code is compatible with the shader parameter structure.
|
inline |
| void FShaderParameterParser::ValidateShaderParameterTypes | ( | const FShaderCompilerInput & | CompilerInput, |
| bool | bPlatformSupportsPrecisionModifier, | ||
| FShaderCompilerOutput & | CompilerOutput | ||
| ) | const |
Validates shader parameter map is compatible with the shader parameter structure.
|
inline |
Indicates that the shader source was actually modified.
Indicates that parameters were actually moved to the root constant buffer.
Indicates that parameters should be moved to the root cosntant buffer.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
protected |
|
protected |