Skip to content

Commit 33f5896

Browse files
committed
Add check for DXIL Version >= 1.2
1 parent 1d90753 commit 33f5896

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/DirectX/DXILShaderFlags.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ void ModuleShaderFlags::initialize(Module &M, DXILResourceTypeMap &DRTM,
191191
// Set UseNativeLowPrecision using dx.nativelowprec module metadata
192192
if (auto *NativeLowPrec = mdconst::extract_or_null<ConstantInt>(
193193
M.getModuleFlag("dx.nativelowprec")))
194-
if (NativeLowPrec->getValue() != 0)
194+
if (MMDI.DXILVersion >= VersionTuple(1, 2) &&
195+
NativeLowPrec->getValue() != 0)
195196
SCCSF.UseNativeLowPrecision = true;
196197

197198
ComputedShaderFlags CSF;

0 commit comments

Comments
 (0)