diff options
| author | Yong He <yonghe@outlook.com> | 2021-09-14 11:36:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-14 14:36:44 -0400 |
| commit | 11d43642008905ac69a3832eb8a9b2ae7b785f86 (patch) | |
| tree | 0d51bc6d16fbbb7a37148230f3bd37cc861830d4 /source/slang/slang-emit-hlsl.cpp | |
| parent | 502aa3812a82cf0d091cff0c67804e4ee448ac78 (diff) | |
Avoid upcasting to f32 in 16bit float-uint bit cast. (#1938)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 4 |
1 files changed, 2 insertions, 2 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; } |
