ECompilerFlags

Windows
MacOS
Linux

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/ShaderCompilerCore.h

Include

#include "ShaderCompilerCore.h"

Syntax

enum ECompilerFlags
{
    CFLAG_PreferFlowControl                   = 0,
    CFLAG_Debug,
    CFLAG_AvoidFlowControl,
    CFLAG_SkipValidation,
    CFLAG_StandardOptimization,
    CFLAG_ForceOptimization,
    CFLAG_OnChip,
    CFLAG_KeepDebugInfo,
    CFLAG_NoFastMath,
    CFLAG_ZeroInitialise,
    CFLAG_BoundsChecking,
    CFLAG_ForceRemoveUnusedInterpolators,
    CFLAG_UseFullPrecisionInPS,
    CFLAG_VertexToGeometryShader,
    CFLAG_VertexToPrimitiveShader,
    CFLAG_VertexUseAutoCulling,
    CFLAG_Archive,
    CFLAG_UsesExternalTexture,
    CFLAG_UseEmulatedUB,
    CFLAG_WaveOperations,
    CFLAG_ForceDXC,
    CFLAG_SkipOptimizations,
    CFLAG_SkipOptimizationsDXC,
    CFLAG_AllowTypedUAVLoads,
    CFLAG_D3D12ForceShaderConductorRewrite,
    CFLAG_AllowRealTypes,
    CFLAG_Max,
}

Values

Name

Description

CFLAG_PreferFlowControl

CFLAG_Debug

CFLAG_AvoidFlowControl

CFLAG_SkipValidation

Disable shader validation.

CFLAG_StandardOptimization

Only allows standard optimizations, not the longest compile times.

CFLAG_ForceOptimization

Always optimize, even when CFLAG_Debug is set. Required for some complex shaders and features.

CFLAG_OnChip

Shader should use on chip memory instead of main memory ring buffer memory.

CFLAG_KeepDebugInfo

Shader should insert debug/name info at the risk of generating non-deterministic libraries.

CFLAG_NoFastMath

CFLAG_ZeroInitialise

Explicitly enforce zero initialization on shader platforms that may omit it.

CFLAG_BoundsChecking

Explicitly enforce bounds checking on shader platforms that may omit it.

CFLAG_ForceRemoveUnusedInterpolators

Force removing unused interpolators for platforms that can opt out.

CFLAG_UseFullPrecisionInPS

Set default precision to highp in a pixel shader (default is mediump on ES platforms)

CFLAG_VertexToGeometryShader

Hint that it is a vertex to geometry shader.

CFLAG_VertexToPrimitiveShader

Hint that it is a vertex to primitive shader.

CFLAG_VertexUseAutoCulling

Hint that a vertex shader should use automatic culling on certain platforms.

CFLAG_Archive

Prepare the shader for archiving in the native binary shader cache format.

CFLAG_UsesExternalTexture

Shaders uses external texture so may need special runtime handling.

CFLAG_UseEmulatedUB

Use emulated uniform buffers on supported platforms.

CFLAG_WaveOperations

Enable wave operation intrinsics (requires DX12 and DXC/DXIL on PC).

CFLAG_ForceDXC

Use DirectX Shader Compiler (DXC) to compile all shaders, intended for compatibility testing.

CFLAG_SkipOptimizations

CFLAG_SkipOptimizationsDXC

Temporarily disable optimizations with DXC compiler only, intended to workaround shader compiler bugs until they can be resolved with 1st party.

CFLAG_AllowTypedUAVLoads

Typed UAV loads are disallowed by default, as Windows 7 D3D 11.0 does not support them; this flag allows a shader to use them.

CFLAG_D3D12ForceShaderConductorRewrite

Force using the SC rewrite functionality before calling DXC on D3D12.

CFLAG_AllowRealTypes

Enable support of C-style data types for platforms that can. Check for PLATFORM_SUPPORTS_REAL_TYPES.

CFLAG_Max

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