summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-hlsl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
-rw-r--r--source/slang/slang-emit-hlsl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index 2d963866d..3813cf9cb 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -826,6 +826,9 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
auto targetProfile = getTargetProgram()->getOptionSet().getProfile();
if (targetProfile.getVersion() < ProfileVersion::DX_6_0)
return false;
+ auto targetCaps = getTargetReq()->getTargetCaps();
+ if (targetCaps.implies(CapabilityAtom::hlsl_2018))
+ return false;
if (as<IRBasicType>(inst->getDataType()))
return false;
@@ -851,6 +854,9 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
auto targetProfile = getTargetProgram()->getOptionSet().getProfile();
if (targetProfile.getVersion() < ProfileVersion::DX_6_0)
return false;
+ auto targetCaps = getTargetReq()->getTargetCaps();
+ if (targetCaps.implies(CapabilityAtom::hlsl_2018))
+ return false;
if (as<IRBasicType>(inst->getDataType()))
return false;