ShaderCompilerCommon

Windows
MacOS
Linux

Classes

Name

Description

Public struct

FHlslccHeader

Public class

FShaderParameterParser

Validates and moves all the shader loose data parameter defined in the root scope of the shader into the root uniform buffer.

Functions

Name Description

Public function

bool

 

BuildResourceTableMapping

(
    const TMap< FString, FResourceTable...,
    const TMap< FString, uint32 >& Res...,
    TBitArray<>& UsedUniformBufferSlot...,
    FShaderParameterMap& ParameterMap,
    FShaderCompilerResourceTable& OutS...
)

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.

Public function

void

 

BuildResourceTableTokenStream

(
    const TArray< uint32 >& InResource...,
    int32 MaxBoundResourceTable,
    TArray< uint32 >& OutTokenStream,
    bool bGenerateEmptyTokenStreamIfNoR...
)

Builds a token stream out of the resource map.

Public function

void

 

CompileOfflineMali

(
    const FShaderCompilerInput& Input,
    FShaderCompilerOutput& ShaderOutpu...,
    const ANSICHAR* ShaderSource,
    const int32 SourceSize,
    bool bVulkanSpirV
)

Calls 'Mali Offline Compiler' to compile the glsl source code and extract the generated instruction count

Public function

bool

 

ConvertFromFP32ToFP16

(
    FString& InOutSourceCode,
    TArray< FString >& OutErrors
)

Public function

FString

 

CreateCrossCompilerBatchFileContents

(
    const FString& ShaderFile,
    const FString& OutputFile,
    const FString& FrequencySwitch,
    const FString& EntryPoint,
    const FString& VersionSwitch,
    const FString& ExtraArguments
)

Cross compiler support/common functionality.

Public function

FString

 

CreateShaderCompilerWorkerDirectCommandLine

(
    const FShaderCompilerInput& Input,
    uint32 CCFlags
)

Public function

bool

 

CrossCompiler::Match

(
    const TCHAR*& Str,
    const TCHAR* Sub
)

Public function

bool

 

CrossCompiler::Match

(
    const ANSICHAR*& Str,
    const ANSICHAR* Sub
)

Public function

bool

 

CrossCompiler::Match

(
    const TCHAR*& Str,
    ANSICHAR Char
)

Public function

bool

 

CrossCompiler::Match

(
    const ANSICHAR*& Str,
    ANSICHAR Char
)

Public function

bool

 

CrossCompiler::ParseIdentifier

(
    const ANSICHAR*& Str,
    FString& OutStr
)

Public function

bool

 

CrossCompiler::ParseIdentifier

(
    const TCHAR*& Str,
    FString& OutStr
)

Public function

bool

 

CrossCompiler::ParseIntegerNumber

(
    const ANSICHAR*& Str,
    T& OutNum
)

Public function

bool

 

CrossCompiler::ParseIntegerNumber

(
    const TCHAR*& Str,
    T& OutNum
)

Public function

bool

 

CrossCompiler::ParseSignedNumber

(
    const ANSICHAR*& Str,
    int32& OutNum
)

Public function

bool

 

CrossCompiler::ParseSignedNumber

(
    const TCHAR*& Str,
    int32& OutNum
)

Public function

bool

 

CrossCompiler::ParseString

(
    const ANSICHAR*& Str,
    FString& OutStr
)

Public function

bool

 

CrossCompiler::ParseString

(
    const TCHAR*& Str,
    FString& OutStr
)

Public function

int16

 

GetNumUniformBuffersUsed

(
    const FShaderCompilerResourceTable ...
)

Finds the number of used uniform buffers in a resource map.

Public function

void

 

RemoveUniformBuffersFromSource

(
    const FShaderCompilerEnvironment& ...,
    FString& PreprocessedShaderSource
)

The cross compiler doesn't yet support struct initializers needed to construct static structs for uniform buffers Replace all uniform buffer struct member references (View.WorldToClip) with a flattened name that removes the struct dependency (View_WorldToClip)

Public function

bool

 

RemoveUnusedInputs

(
    FString& InOutSourceCode,
    const TArray< FString >& InUsedInp...,
    FString& InOutEntryPoint,
    TArray< FString >& OutErrors
)

Public function

bool

 

RemoveUnusedOutputs

(
    FString& InOutSourceCode,
    const TArray< FString >& InUsedOut...,
    const TArray< FString >& InExcepti...,
    FString& InOutEntryPoint,
    TArray< FString >& OutErrors
)

Public function

void

 

StripInstancedStereo

(
    FString& ShaderSource
)

Fall back to using the View uniform buffer directly for platforms that don't support instanced stereo.

Variables

Name Description

Public variable

ESCWErrorCode

 

GSCWErrorCode

Error code for SCW to help track down crashes.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss