[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 11:32:06 PDT 2025
================
@@ -282,10 +282,14 @@ void CGHLSLRuntime::addHLSLBufferLayoutType(const RecordType *StructType,
void CGHLSLRuntime::finishCodeGen() {
auto &TargetOpts = CGM.getTarget().getTargetOpts();
+ auto &LangOpts = CGM.getLangOpts();
llvm::Module &M = CGM.getModule();
Triple T(M.getTargetTriple());
if (T.getArch() == Triple::ArchType::dxil)
addDxilValVersion(TargetOpts.DxilValidatorVersion, M);
+ if (LangOpts.NativeHalfType)
----------------
inbelic wrote:
Can we add a comment here that describes why we can just use `NativeHalfType` to set this flag and the relationship that it has iwth `enable-16bit-types` in DXC
https://github.com/llvm/llvm-project/pull/134288
More information about the llvm-commits
mailing list