diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 6 | ||||
| -rw-r--r-- | source/slang/slang-hlsl-intrinsic-set.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index db442d131..5dd028182 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -969,6 +969,8 @@ void CPPSourceEmitter::_emitGetAtDefinition(const UnownedStringSlice& funcName, IRType* srcType = funcType->getParamType(0); + emitSpecializedOperationDefinitionPreamble(specOp); + IRType* retType = specOp->returnType; emitType(retType); m_writer->emit("& "); @@ -1046,6 +1048,8 @@ void CPPSourceEmitter::_emitConstructConvertDefinition(const UnownedStringSlice& IRType* srcType = funcType->getParamType(1); IRType* retType = specOp->returnType; + emitSpecializedOperationDefinitionPreamble(specOp); + emitType(retType); writer->emit(" "); writer->emit(funcName); @@ -1112,6 +1116,8 @@ void CPPSourceEmitter::_emitConstructFromScalarDefinition(const UnownedStringSli IRType* srcType = funcType->getParamType(1); IRType* retType = specOp->returnType; + emitSpecializedOperationDefinitionPreamble(specOp); + emitType(retType); writer->emit(" "); writer->emit(funcName); diff --git a/source/slang/slang-hlsl-intrinsic-set.h b/source/slang/slang-hlsl-intrinsic-set.h index d55c908ae..df1677b17 100644 --- a/source/slang/slang-hlsl-intrinsic-set.h +++ b/source/slang/slang-hlsl-intrinsic-set.h @@ -123,7 +123,9 @@ just constructXXXFromScalar. Would be good if there was a suitable name to encom x(ConstructFromScalar, "", 1) \ \ x(GetAt, "", 2) \ - x(SetAt, "", 3) + x(SetAt, "", 3) \ + \ + x(CountBits, "countbits", 1) struct HLSLIntrinsic { |
