Explicit message if vulkan encode is not available

This commit is contained in:
Patrick Nicolas
2024-10-29 10:45:09 +01:00
parent df5e0869c3
commit 2c19d8698f
+2
View File
@@ -134,6 +134,8 @@ static void create_encoders(wivrn_comp_target * cn)
#if WIVRN_USE_VULKAN_ENCODE
if (std::ranges::any_of(cn->settings, [](const auto & item) { return item.encoder_name == encoder_vulkan; }))
{
if (vk->encode_queue == nullptr)
throw std::runtime_error("Vulkan video encoder was requested, but it is not supported by device or driver");
auto & device = cn->wivrn_bundle->device;
cn->psc.video_command_pool = device.createCommandPool({
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,