From 17285faf9b4fe7f6c28b43972212068465bdb42e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 8 Jan 2020 09:36:25 -0500 Subject: CUDA generated first test compiles. (#1161) --- source/slang/slang-emit-cpp.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/slang/slang-emit-cpp.h') diff --git a/source/slang/slang-emit-cpp.h b/source/slang/slang-emit-cpp.h index 784696b08..d71983c92 100644 --- a/source/slang/slang-emit-cpp.h +++ b/source/slang/slang-emit-cpp.h @@ -66,6 +66,10 @@ protected: virtual bool tryEmitGlobalParamImpl(IRGlobalParam* varDecl, IRType* varType) SLANG_OVERRIDE; + // Replaceable for classes derived from CPPSourceEmitter + virtual SlangResult calcTypeName(IRType* type, CodeGenTarget target, StringBuilder& out); + + void emitIntrinsicCallExpr( IRCall* inst, IRTargetIntrinsicDecoration* targetIntrinsic, @@ -101,11 +105,8 @@ protected: StringSlicePool::Handle _calcFuncName(const HLSLIntrinsic* specOp); UnownedStringSlice _getTypeName(IRType* type); - //StringSlicePool::Handle _calcTypeName(IRType* type); - - SlangResult _calcTypeName(IRType* type, CodeGenTarget target, StringBuilder& out); - - SlangResult _calcTextureTypeName(IRTextureTypeBase* texType, StringBuilder& outName); + + SlangResult _calcCPPTextureTypeName(IRTextureTypeBase* texType, StringBuilder& outName); void _emitEntryPointDefinitionStart(IRFunc* func, IRGlobalParam* entryPointGlobalParams, const String& funcName, const UnownedStringSlice& varyingTypeName); void _emitEntryPointDefinitionEnd(IRFunc* func); @@ -116,6 +117,8 @@ protected: bool _tryEmitInstExprAsIntrinsic(IRInst* inst, const EmitOpInfo& inOuterPrec); + HLSLIntrinsic* _addIntrinsic(HLSLIntrinsic::Op op, IRType* returnType, IRType*const* argTypes, Index argTypeCount); + Dictionary m_typeNameMap; Dictionary m_intrinsicNameMap; -- cgit v1.2.3