From: Karol Herbst Date: Sat, 15 Aug 2020 19:49:05 +0000 (+0200) Subject: clover/spirv: pass list of supported extensions to the translator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adda97c98bfb5122a261561b3103023e7c21b381;p=mesa.git 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: --- 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 }