From f098f11d37286bb0ad57549b18c05ba416640c45 Mon Sep 17 00:00:00 2001 From: Marcin Naczk Date: Fri, 20 May 2022 10:11:42 +0200 Subject: [PATCH 1/2] Add shouldPreserveOCLKernelArgTypeMetadataThroughString Because of commit: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/835eb7e8696ab4ba764d6e1b4c2f3e2c4ddc0551 Need to add shouldPreserveOCLKernelArgTypeMetadataThroughString to SPIRV::TranslatorOpts to still be able to correctly parse kernel arguments type, by metadata. --- common_clang.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common_clang.cpp b/common_clang.cpp index cfae18be..5c9250bd 100644 --- a/common_clang.cpp +++ b/common_clang.cpp @@ -324,6 +324,7 @@ Compile(const char *pszProgramSource, const char **pInputHeaders, if (!optionsParser.hasOptDisable()) { SPIRVOpts.setMemToRegEnabled(true); } + SPIRVOpts.shouldPreserveOCLKernelArgTypeMetadataThroughString(true); success = llvm::writeSpirv(M.get(), SPIRVOpts, OS, Err); err_ostream << Err.c_str(); err_ostream.flush(); From 0d281b2a6407d181d4ff24e8aa54288215244dd7 Mon Sep 17 00:00:00 2001 From: Marcin Naczk Date: Fri, 20 May 2022 11:33:03 +0200 Subject: [PATCH 2/2] fix function name --- common_clang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_clang.cpp b/common_clang.cpp index 5c9250bd..4d4432a8 100644 --- a/common_clang.cpp +++ b/common_clang.cpp @@ -324,7 +324,7 @@ Compile(const char *pszProgramSource, const char **pInputHeaders, if (!optionsParser.hasOptDisable()) { SPIRVOpts.setMemToRegEnabled(true); } - SPIRVOpts.shouldPreserveOCLKernelArgTypeMetadataThroughString(true); + SPIRVOpts.setPreserveOCLKernelArgTypeMetadataThroughString(true); success = llvm::writeSpirv(M.get(), SPIRVOpts, OS, Err); err_ostream << Err.c_str(); err_ostream.flush();