From dadda6878b61c21482f5dfca2eafa649f1b0136c Mon Sep 17 00:00:00 2001 From: Whitney Tsang Date: Wed, 25 Sep 2024 22:18:30 -0400 Subject: [PATCH] Disable `SPV_KHR_untyped_pointers` extension (#2345) https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/7dacb7cdedc9c01e0ce88f1f3766c42ab8f59b7c added the `SPV_KHR_untyped_pointers` extension to the LLVM-SPIRV translator. They won't want to enable this extension, as it causes failures. Signed-off-by: Whitney Tsang --- lib/Target/SPIRV/SPIRVTranslation.cpp | 2 ++ lib/Target/SPIRV/spirv-llvm-translator.conf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/SPIRV/SPIRVTranslation.cpp b/lib/Target/SPIRV/SPIRVTranslation.cpp index 86c8e4bceb..e790237658 100644 --- a/lib/Target/SPIRV/SPIRVTranslation.cpp +++ b/lib/Target/SPIRV/SPIRVTranslation.cpp @@ -57,6 +57,8 @@ std::string translateLLVMIRToSPIRV(llvm::Module &module) { SPIRV::TranslatorOpts SPIRVOpts; SPIRVOpts.enableAllExtensions(); + SPIRVOpts.setAllowedToUseExtension( + SPIRV::ExtensionID::SPV_KHR_untyped_pointers, false); SPIRVOpts.setMemToRegEnabled(true); SPIRVOpts.setPreserveOCLKernelArgTypeMetadataThroughString(true); SPIRVOpts.setPreserveAuxData(false); diff --git a/lib/Target/SPIRV/spirv-llvm-translator.conf b/lib/Target/SPIRV/spirv-llvm-translator.conf index 2026f637b1..8bafbb55d4 100644 --- a/lib/Target/SPIRV/spirv-llvm-translator.conf +++ b/lib/Target/SPIRV/spirv-llvm-translator.conf @@ -1 +1 @@ -2b5f15d871aa39bcc9d2667883dd989afa32a146 +7dacb7cdedc9c01e0ce88f1f3766c42ab8f59b7c