| CFLAG_PreferFlowControl |
To add a flag: SHADER_COMPILER_FLAGS_ENTRY(FlagName) - generates CFLAG_FlagName For deprecated flags: SHADER_COMPILER_FLAGS_ENTRY_DEPRECATED(FlagName, X.X, "Deprecation Message") - generates CFLAG_FlagName UE_DEPRECATED(X.X, "Deprecation Message") |
| 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 whenDebug is set. Required for some complex shaders and features. |
| CFLAG_GenerateSymbols |
Shader should generate symbols for debugging. |
| CFLAG_ExtraShaderData |
Shader should insert debug/name info at the risk of generating non-deterministic libraries. |
| CFLAG_AllowUniqueSymbols |
Allows the (external) symbols to be specific to each shader rather than trying to deduplicate. |
| 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_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_Wave32 |
Prefer shader execution in wave32 mode if possible. |
| CFLAG_InlineRayTracing |
Enable support of inline raytracing in compute shader. |
| CFLAG_AllowRealTypes |
Enable support of C-style data types for platforms that can. Check for PLATFORM_SUPPORTS_REAL_TYPES and FDataDrivenShaderPlatformInfo::GetSupportsRealTypes() |
| CFLAG_PrecompileWithDXC |
Precompile HLSL to optimized HLSL then forward to FXC. Speeds up some shaders that take longer with FXC and works around crashes in FXC. |
| CFLAG_HLSL2021 |
Enable HLSL 2021 version. Enables templates, operator overloading, and C++ style function overloading. Contains breaking change with short-circuiting evaluation. |
| CFLAG_WarningsAsErrors |
Allow warnings to be treated as errors. |
| CFLAG_BindlessResources |
|
| CFLAG_BindlessSamplers |
|
| CFLAG_ForceBindful |
Force disable bindless resources and samplers on a shader. |
| CFLAG_RemoveDeadCode |
EXPERIMENTAL: Run the shader re-writer that removes any unused functions/resources/types from source code before compilation. |
| CFLAG_CullBeforeFetch |
Enable CullBeforeFetch optimization on supported platforms. |
| CFLAG_WarpCulling |
Enable WarpCulling optimization on supported platforms. |
| CFLAG_GenerateSymbolsInfo |
Shader should generate minimal symbols info. |
| CFLAG_RootConstants |
Enabled root constants optimization on supported platforms. |
| CFLAG_CheckForDerivativeOps |
Specifies that a shader provides derivatives, and the compiler should look in the compiled ISA for any instructions requiring auto derivatives. |
| CFLAG_IndirectDraw |
Shader is used with indirect draws. |
| CFLAG_ShaderBundle |
Shader is used with shader bundles. |
| CFLAG_DisableSourceStripping |
Shader code should not be stripped of comments/whitespace/line directives at the end of preprocessing. |
| CFLAG_ShaderBindingLayout |
Shader uses RHI Shader Binding Layout for global shader binding. |
| CFLAG_OutputAnalysisArtifacts |
Request full shader analysis artifacts in output statistics. This may contain multiple compilation steps in full text form. |
| CFLAG_ForceSpirvDebugInfo |
Force to generate debug info, i.e. FShaderConductorOptions::bEnableDebugInfo. |
| CFLAG_SupportsMinimalBindless |
Include in the "Minimal" bindless configuration. |
| CFLAG_Max |
|