ref:1a6fb5f19ab7c722e3bf1d8ae9609923762a2b95

fix(linux/vulkan): Ensure RADV vulkan video encoding is enabled on newer versions of Mesa (#5211)

SHA: 1a6fb5f19ab7c722e3bf1d8ae9609923762a2b95
Author: Kishi <41839133+Kishi85@users.noreply.github.com>
Date: 2026-05-29 17:22
Parents: ec2b30e
1 files changed +16 -0
Type
src/platform/linux/misc.cpp +16 −0
@@ -445,10 +445,24 @@
lifetime::exit_sunshine(0, true);
}
std::string get_env(const std::string &name) {
if (const auto value = getenv(name.c_str()); value != nullptr) {
return value;
}
return "";
}
int set_env(const std::string &name, const std::string &value) {
return setenv(name.c_str(), value.c_str(), 1);
}
int append_env(const std::string &name, const std::string &value, const std::string &separator) {
if (const std::string old_value = get_env(name); !old_value.contains(value)) {
return set_env(name, old_value.empty() ? value : old_value + separator + value);
}
return 0;
}
int unset_env(const std::string &name) {
return unsetenv(name.c_str());
}
@@ -1130,6 +1144,8 @@
// enable Vulkan video extensions for AMD RADV
set_env("RADV_PERFTEST", "video_encode");
// Above is deprecated on Mesa 26.1+ and replaced by (keep both to ensure best compatibility):
append_env("RADV_EXPERIMENTAL", "video_encode", ",");
// These are allowed to fail.
gbm::init();