diff options
| -rw-r--r-- | lib/SPIRV/OCL20ToSPIRV.cpp | 2 | ||||
| -rw-r--r-- | lib/SPIRV/SPIRVInternal.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/SPIRV/OCL20ToSPIRV.cpp b/lib/SPIRV/OCL20ToSPIRV.cpp index a8b8e8c..504bfd6 100644 --- a/lib/SPIRV/OCL20ToSPIRV.cpp +++ b/lib/SPIRV/OCL20ToSPIRV.cpp @@ -1196,7 +1196,7 @@ void OCL20ToSPIRV::transWorkItemBuiltinsToVariables() { IsVec ? VectorType::get(I.getReturnType(), 3) : I.getReturnType(); auto BV = new GlobalVariable( *M, GVType, true, GlobalValue::ExternalLinkage, nullptr, BuiltinVarName, - 0, GlobalVariable::NotThreadLocal, SPIRAS_Constant); + 0, GlobalVariable::NotThreadLocal, SPIRAS_Input); std::vector<Instruction *> InstList; for (auto UI = I.user_begin(), UE = I.user_end(); UI != UE; ++UI) { auto CI = dyn_cast<CallInst>(*UI); diff --git a/lib/SPIRV/SPIRVInternal.h b/lib/SPIRV/SPIRVInternal.h index 99962b0..75e3281 100644 --- a/lib/SPIRV/SPIRVInternal.h +++ b/lib/SPIRV/SPIRVInternal.h @@ -178,6 +178,7 @@ enum SPIRAddressSpace { SPIRAS_Constant, SPIRAS_Local, SPIRAS_Generic, + SPIRAS_Input, SPIRAS_Count, }; @@ -187,6 +188,7 @@ template <> inline void SPIRVMap<SPIRAddressSpace, std::string>::init() { add(SPIRAS_Constant, "Constant"); add(SPIRAS_Local, "Local"); add(SPIRAS_Generic, "Generic"); + add(SPIRAS_Input, "Input"); } typedef SPIRVMap<SPIRAddressSpace, SPIRVStorageClassKind> SPIRAddrSpaceCapitalizedNameMap; @@ -198,6 +200,7 @@ inline void SPIRVMap<SPIRAddressSpace, SPIRVStorageClassKind>::init() { add(SPIRAS_Constant, StorageClassUniformConstant); add(SPIRAS_Local, StorageClassWorkgroup); add(SPIRAS_Generic, StorageClassGeneric); + add(SPIRAS_Input, StorageClassInput); } typedef SPIRVMap<SPIRAddressSpace, SPIRVStorageClassKind> SPIRSPIRVAddrSpaceMap; |
