Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
std::min(static_cast<SPIRV::VersionNumber>(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 <LLVMSPIRVLib/LLVMSPIRVExtensions.inc>
+ #undef EXT
+ }
+
+ return SPIRV::TranslatorOpts(maximum_spirv_version, spirv_extensions);
}
#endif
}