From adda97c98bfb5122a261561b3103023e7c21b381 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 15 Aug 2020 21:49:05 +0200 Subject: [PATCH] clover/spirv: pass list of supported extensions to the translator Signed-off-by: Karol Herbst Reviewed-by: Pierre Moreau Reviewed-by: Francisco Jerez Part-of: --- src/gallium/frontends/clover/llvm/invocation.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp index 04db2f90e03..f7c0313be4d 100644 --- a/src/gallium/frontends/clover/llvm/invocation.cpp +++ b/src/gallium/frontends/clover/llvm/invocation.cpp @@ -316,7 +316,14 @@ namespace { std::min(static_cast(supported_versions.back()), SPIRV::VersionNumber::MaximumVersion); - return SPIRV::TranslatorOpts(maximum_spirv_version); + SPIRV::TranslatorOpts::ExtensionsStatusMap spirv_extensions; + for (auto &ext : spirv::supported_extensions()) { + #define EXT(X) if (ext == #X) spirv_extensions.insert({ SPIRV::ExtensionID::X, true }); + #include + #undef EXT + } + + return SPIRV::TranslatorOpts(maximum_spirv_version, spirv_extensions); } #endif } -- 2.30.2