ShaderCompilerCommon

Windows
MacOS
Linux

Classes

Name

Description

Public struct

FDllHandle

Public class

FDxcModuleWrapper

Public struct

FHlslccHeader

Public class

FShaderConductorContext

Wrapper class to handle interface between UE and ShaderConductor.

Public class

FShaderConductorModuleWrapper

Public struct

FShaderConductorOptions

Wrapper structure to pass options descriptor to ShaderConductor.

Public struct

FShaderConductorTarget

Shader conductor output target descriptor.

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.

Enums

Name

Description

Public enum

CrossCompiler::EShaderConductorLanguage

Target high level languages for ShaderConductor output.

Public enum

EShaderConductorTarget

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,
    const ANSICHAR * VulkanSpirVEnt...
)

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 TCHAR*& Str,
    FString & OutStr
)

Public function

bool

 

CrossCompiler::ParseIdentifier

(
    const ANSICHAR *& 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 TCHAR*& Str,
    int32 & OutNum
)

Public function

bool

 

CrossCompiler::ParseSignedNumber

(
    const ANSICHAR *& Str,
    int32 & OutNum
)

Public function

bool

 

CrossCompiler::ParseString

(
    const TCHAR*& Str,
    FString & OutStr
)

Public function

bool

 

CrossCompiler::ParseString

(
    const ANSICHAR *& Str,
    FString & OutStr
)

Public function

void

 

CullGlobalUniformBuffers

(
    const TMap < FString , FString >& Re...,
    FShaderParameterMap & ParameterMap
)

Culls global uniform buffer entries from the parameter map.

Public function

void

 

DumpDebugShaderBinary

(
    const FShaderCompilerInput & Input,
    void * InData,
    int32 InDataByteSize,
    const FString & FileExtension
)

Public function

void

 

DumpDebugShaderText

(
    const FShaderCompilerInput & Input,
    ANSICHAR * InSource,
    int32 InSourceLength,
    const FString & FileExtension
)

Public function

void

 

DumpDebugShaderText

(
    const FShaderCompilerInput & Input,
    const FString & InSource,
    const FString & FileExtension
)

Public function

void

 

DumpDebugUSF

(
    const FShaderCompilerInput & Input,
    const ANSICHAR * Source,
    uint32 HlslCCFlags,
    const TCHAR * OverrideBaseFilen...
)

Utility functions shared amongst all backends to write out a dumped USF.

Public function

void

 

DumpDebugUSF

(
    const FShaderCompilerInput & Input,
    const ANSICHAR * Source,
    int32 SourceLength,
    uint32 HlslCCFlags,
    const TCHAR * OverrideBaseFilen...
)

SourceLength is no longer needed.

Public function

void

 

DumpDebugUSF

(
    const FShaderCompilerInput & Input,
    const FString & Source,
    uint32 HlslCCFlags,
    const TCHAR * OverrideBaseFilen...
)

SourceLength is no longer needed.

Public function

FString

 

GetDumpDebugUSFContents

(
    const FShaderCompilerInput & Input,
    const FString & Source,
    uint32 HlslCCFlags
)

Gets the string that DumpDebugUSF writes out.

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.

Public function

void

 

WriteShaderConductorCommandLine

(
    const FShaderCompilerInput & Input,
    const FString & SourceFilename,
    EShaderConductorTarget Target
)

Variables

Name Description

Public variable

ESCWErrorCode

 

GSCWErrorCode

Error code for SCW to help track down crashes.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback