summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/slang-emit-hlsl.cpp4
-rw-r--r--source/slang/slang-ir-any-value-marshalling.cpp3
2 files changed, 2 insertions, 5 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index dc58b7507..9ebf204ac 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -480,7 +480,7 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
m_writer->emit(")");
break;
case BaseType::Half:
- m_writer->emit("f16tof32");
+ m_writer->emit("asfloat16");
break;
case BaseType::Float:
// Note: at present HLSL only supports
@@ -522,7 +522,7 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
break;
case BaseType::Half:
- m_writer->emit("f32tof16(");
+ m_writer->emit("asuint16(");
closeCount++;
break;
}
diff --git a/source/slang/slang-ir-any-value-marshalling.cpp b/source/slang/slang-ir-any-value-marshalling.cpp
index b88dd79d1..c7f40efc0 100644
--- a/source/slang/slang-ir-any-value-marshalling.cpp
+++ b/source/slang/slang-ir-any-value-marshalling.cpp
@@ -284,9 +284,6 @@ namespace Slang
auto dstVal = builder->emitLoad(dstAddr);
if (intraFieldOffset == 0)
{
- srcVal = builder->emitBitAnd(
- srcVal->getFullType(), srcVal,
- builder->getIntValue(builder->getUIntType(), 0xFFFF));
dstVal = builder->emitBitAnd(
dstVal->getFullType(), dstVal,
builder->getIntValue(builder->getUIntType(), 0xFFFF0000));