Navigation
| Name | ShaderCompilerCommon |
| Type | Developer |
| Location | /Engine/Source/Developer/ShaderCompilerCommon/ |
| Module Build Rules | ShaderCompilerCommon.Build.cs |
Classes
| Name | Remarks |
|---|---|
| FBaseShaderFormat | |
| FDxcModuleWrapper | |
| FHlslccHeaderWriter | |
| FShaderConductorContext | Wrapper class to handle interface between UE and ShaderConductor. |
| FShaderConductorModuleWrapper | |
| TSpirvForwardIterator | Template forward iterator for SPIR-V instructions. |
Structs
| Name | Remarks |
|---|---|
| FDebugShaderDataOptions | |
| FDiagnostics | |
| FDllHandle | |
| FHlslccHeader | |
| FHlslShaderModel | Shader model version for HLSL input language. |
| FMinifiedShader | |
| FShaderConductorIdentifierTable | Container for all special case SPIR-V identifiers generated by ShaderConductor. |
| FShaderConductorOptions | Wrapper structure to pass options descriptor to ShaderConductor. |
| FShaderConductorTarget | Shader conductor output target descriptor. |
| FSpirv | Base structure for SPIR-V modules in the shader backends. |
| FSpirvReflectBindings | Container structure for all SPIR-V reflection resources and in/out attributes. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FSpirvConstIterator | TSpirvForwardIterator< const uint32 > | SpirvCommon.h | |
| FSpirvIterator | TSpirvForwardIterator< uint32 > | SpirvCommon.h |
Enums
Public
| Name | Remarks |
|---|---|
| CrossCompiler::EShaderConductorIR | Intermediate representation languages for ShaderConductor disassembly output. |
| CrossCompiler::EShaderConductorLanguage | Target high level languages for ShaderConductor output. |
| EInstructionSet | |
| EShaderConductorTarget | |
| EUniformBufferMemberReflectionReason | |
| UE::ShaderMinifier::EMinifyShaderFlags |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| UE::ShaderCompilerCommon::kPlatformHashStatName | const TCHAR * | ShaderCompilerCommon.h | |
| UE::ShaderCompilerCommon::kUniformBufferConstantBufferPrefix | const TCHAR * | ShaderCompilerCommon.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Symbols | TConstArrayView< FStringView > | Structure to hold forward declarations for a specific scope/namespace chain for the HlslParser | ShaderCompilerCommon.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddNoteToDisplayShaderParameterStructureOnCppSide
(
const FShaderParametersMetadata* ParametersStructure, |
Adds a note to CompilerOutput.Error about where the shader parameter structure is on C++ side. | ShaderCompilerCommon.h | |
void AddShaderValidationSRVType
(
uint16 BindPoint, |
ShaderCompilerCommon.h | ||
void AddShaderValidationUAVType
(
uint16 BindPoint, |
ShaderCompilerCommon.h | ||
void AddShaderValidationUBSize
(
uint16 BindPoint, |
ShaderCompilerCommon.h | ||
void AddUnboundShaderParameterError
(
const FShaderCompilerInput& CompilerInput, |
Adds an error to CompilerOutput.Error about a shader parameters that could not be bound. | ShaderCompilerCommon.h | |
bool BuildResourceTableMapping
(
const FShaderResourceTableMap& ResourceTableMap, |
This function looks for resources specified in ResourceTableMap in the parameter map, adds them to the resource table, and removes them from the parameter map. | ShaderCompilerCommon.h | |
void BuildResourceTableTokenStream
(
const TArray< uint32 >& InResourceMap, |
Builds a token stream out of the resource map. | ShaderCompilerCommon.h | |
void CleanupUniformBufferCode
(
const FShaderCompilerEnvironment& Environment, |
Convert generated UniformBuffer code and references into something the shader compilers can use. | ShaderCompilerCommon.h | |
void CompileShaderOffline
(
const FShaderCompilerInput& Input, |
Calls 'Offline Compiler' to compile the source code and extract the stats | ShaderCompilerCommon.h | |
bool ConvertFromFP32ToFP16
(
FString& InOutSourceCode, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::Match
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::Match
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::Match
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::Match
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseIdentifier
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseIdentifier
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseIntegerNumber
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseIntegerNumber
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseSignedNumber
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseSignedNumber
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseString
(
const ANSICHAR*& Str, |
ShaderCompilerCommon.h | ||
bool CrossCompiler::ParseString
(
const TCHAR*& Str, |
ShaderCompilerCommon.h | ||
void CullGlobalUniformBuffers
(
const TMap< FString, FUniformBufferEntry >& UniformBufferMap, |
Culls global uniform buffer entries from the parameter map. | ShaderCompilerCommon.h | |
void DumpDebugShaderBinary
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderBinary
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderDisassembledDxil
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderDisassembledSpirv
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderText
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderText
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void DumpDebugShaderText
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
ENUM_CLASS_FLAGS
(
EUniformBufferMemberReflectionReason |
ShaderCompilerCommon.h | ||
bool FindEntryPointParameters
(
... |
Shader input/output parameter storage classes. | ShaderCompilerCommon.h | |
const CharType * FindMatchingBlock
(
const CharType* OpeningCharPtr, |
ShaderCompilerCommon.h | ||
const CharType * FindMatchingClosingBrace
(
const CharType* OpeningCharPtr |
ShaderCompilerCommon.h | ||
FStringView FindNextHLSLDefinitionOfType
(
FStringView Typename, |
ShaderCompilerCommon.h | ||
void FindOffsetToSpirvEntryPoint
(
const FSpirv& Spirv, |
Returns word offset to the entry point (OpEntryPoint) and name of the entry point (OpName). | SpirvCommon.h | |
const ANSICHAR * FindSpirvEntryPoint
(
const FSpirv& Spirv |
Finds the entry point name name. | SpirvCommon.h | |
int16 GetNumUniformBuffersUsed
(
const FShaderCompilerResourceTable& InSRT |
Finds the number of used uniform buffers in a resource map. | ShaderCompilerCommon.h | |
void HandleReflectedGlobalConstantBufferMember
(
const FString& MemberName, |
ShaderCompilerCommon.h | ||
void HandleReflectedRootConstantBuffer
(
int32 ConstantBufferSize, |
ShaderCompilerCommon.h | ||
void HandleReflectedRootConstantBufferMember
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderResource
(
const FString& ResourceName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderResource
(
const FString& ResourceName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderResource
(
const FString& ResourceName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderSampler
(
const FString& SamplerName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderSampler
(
const FString& SamplerName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderSampler
(
const FString& SamplerName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderUAV
(
const FString& UAVName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderUAV
(
const FString& UAVName, |
ShaderCompilerCommon.h | ||
void HandleReflectedShaderUAV
(
const FString& UAVName, |
ShaderCompilerCommon.h | ||
void HandleReflectedUniformBuffer
(
const FString& UniformBufferName, |
ShaderCompilerCommon.h | ||
void HandleReflectedUniformBuffer
(
const FString& UniformBufferName, |
ShaderCompilerCommon.h | ||
void HandleReflectedUniformBuffer
(
const FString& UniformBufferName, |
ShaderCompilerCommon.h | ||
void HandleReflectedUniformBufferConstantBufferMember
(
EUniformBufferMemberReflectionReason Reason, |
ShaderCompilerCommon.h | ||
bool InlineFunction
(
FString& InOutSourceCode, |
EXPERIMENTAL: Adds a new function to the shader where calls to FunctionToInline_ from EntryPoint_ are inlined using AST manipulation Current limitations: |
ShaderCompilerCommon.h | |
bool ISAParser::HasDerivativeOps
(
bool& bHasDerivativeOps, |
ISAParser/ISAParser.h | ||
const TCHAR * ParseHLSLSymbolName
(
const TCHAR* SearchString, |
ShaderCompilerCommon.h | ||
void ParseHLSLTypeName
(
const TCHAR* SearchString, |
ShaderCompilerCommon.h | ||
void ParseSpirvGlobalVariables
(
const FSpirv& Spirv, |
Parse global variables (anything but function local variables) of specified storage class from the specified SPIR-V module. | SpirvCommon.h | |
const ANSICHAR * PatchSpirvEntryPointWithCRC
(
FSpirv& Spirv, |
Renames the fixed-size entry point name (which must be "main_00000000_00000000") to the formatted name including a CRC over the module. | SpirvCommon.h | |
bool RemoveUnusedInputs
(
... |
ShaderCompilerCommon.h | ||
bool RemoveUnusedOutputs
(
... |
ShaderCompilerCommon.h | ||
EUniformBufferMemberReflectionReason ShouldReflectUniformBufferMembers
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
const TCHAR * SpirvBuiltinToString
(
const SpvBuiltIn BuiltIn |
Returns the string representation of the specified SPIR-V built-in variable, e.g. SpvBuiltInPosition to TEXT("gl_Position"). | SpirvCommon.h | |
void UE::ShaderCompilerCommon::BuildShaderResourceTable
(
const FShaderCompilerResourceTable& GenericSRT, |
ShaderCompilerCommon.h | ||
void UE::ShaderCompilerCommon::ParseRayTracingEntryPoint
(
const FString& Input, |
ShaderCompilerCommon.h | ||
void UE::ShaderCompilerCommon::ParseRayTracingEntryPoint
(
const FStringView& Input, |
Parses ray tracing shader entry point specification string in one of the following formats: 1) Verbatim single entry point name, e.g. "MainRGS" 2) Complex entry point for ray tracing hit group shaders: a) "closesthit=MainCHS" b) "closesthit=MainCHS anyhit=MainAHS" c) "closesthit=MainCHS anyhit=MainAHS intersection=MainIS" d) "closesthit=MainCHS intersection=MainIS" NOTE: closesthit attribute must always be provided for complex hit group entry points | ShaderCompilerCommon.h | |
FStringView UE::ShaderCompilerCommon::RemoveConstantBufferPrefix
(
FStringView InName |
ShaderCompilerCommon.h | ||
FString UE::ShaderCompilerCommon::RemoveConstantBufferPrefix
(
const FString& InName |
ShaderCompilerCommon.h | ||
bool UE::ShaderCompilerCommon::RemoveDeadCode
(
FShaderSource& InOutPreprocessedShaderSource, |
Rewrites a fully preprocessed shader source code, removing any functions or structs that are not reachable from a given entry point or list of symbols. | ShaderCompilerCommon.h | |
bool UE::ShaderCompilerCommon::RemoveDeadCode
(
FShaderSource& InOutPreprocessedShaderSource, |
ShaderCompilerCommon.h | ||
bool UE::ShaderCompilerCommon::RemoveDeadCode
(
FShaderSource& InOutPreprocessedShaderSource, |
ShaderCompilerCommon.h | ||
bool UE::ShaderCompilerCommon::ValidatePackedResourceCounts
(
FShaderCompilerOutput& Output, |
ShaderCompilerCommon.h | ||
bool UE::ShaderCompilerCommon::ValidateShaderAgainstKnownIssues
(
const FString& InSourceCode, |
Runs a few validation steps and reports any known issues such as parameter names that might cause problems on certain backend compilers, especially the old FXC compiler. | ShaderCompilerCommon.h | |
UE::ShaderMinifier::ENUM_CLASS_FLAGS
(
EMinifyShaderFlags |
ShaderMinifier.h | ||
void UpdateStructuredBufferStride
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h | ||
void WriteShaderConductorCommandLine
(
const FShaderCompilerInput& Input, |
ShaderCompilerCommon.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DumpDebugBlobDetail
(
IDxcBlob* Blob, |
|||
static HRESULT RetrieveDebugNameAndBlob
(
TRefCountPtr< IDxcResult >& CompileResult, |