-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
backend:DirectXclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
Implement analysis to set the flag if command-line option -enable-16bit-types is specified and Shader Model is 6.2 or later
NOTE: If this is set, min-precision mode (UseMinPrecision) is not set.
(Edit)
This analysis can be integrated into the existing DXIL Shader Flags Analysis pass (DXILShaderFlags.h/.cpp).
Implementation: Set the flag UseNativeLowPrecision true if and only if all of the following conditions are satisfied:
- The
NativeHalfTypeLang Option (LangOptions.def) is true - Shader Model is 6.2 or later.
Condition 1 is equivalent to checking if -enable-16bit-types is specified on the command-line in clang-dxc.
Additional notes regarding the UseNativeLowPrecision flag:
- The flag is set even if the shader does not contain or use 16-bit types: https://godbolt.org/z/3xh6Eb13d
- The flag is set even in the presence of
min-types (such asmin16float): https://godbolt.org/z/znc49aTnP
Metadata
Metadata
Assignees
Labels
backend:DirectXclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Type
Projects
Status
Closed