fix(linux): guard wlroots Vulkan calls in builds without Vulkan (#6012)

This commit is contained in:
Darsh Poddar authored and GitHub committed 2026-11-01 23:36:47 -05:00
1 parent 4dadc7d40c
commit d8a9bf1cb8
1 file changed
+4
+4
View File
@@ -842,9 +842,11 @@ namespace wl {
}
#endif
#ifdef SUNSHINE_BUILD_VULKAN
if (mem_type == platf::mem_type_e::vulkan) {
return vk::make_avcodec_encode_device_vram(width, height, 0, 0);
}
#endif
return std::make_unique<platf::avcodec_encode_device_t>();
}
@@ -867,6 +869,7 @@ namespace wl {
*/
void init_encoder_modifiers(platf::mem_type_e hwdevice_type) {
if (hwdevice_type == platf::mem_type_e::vulkan) {
#ifdef SUNSHINE_BUILD_VULKAN
encoder_modifiers = vk::get_supported_capture_modifiers();
if (!encoder_modifiers.empty()) {
intersected_modifiers = wl::intersect_modifiers(interface.supported_modifiers, encoder_modifiers);
@@ -874,6 +877,7 @@ namespace wl {
BOOST_LOG(warning) << "[wlgrab] No common modifiers between compositor and vulkan encoder"sv;
}
}
#endif
}
}