Add support for intra-refresh with vulkan video

This commit is contained in:
Patrick Nicolas
2026-04-02 15:17:17 +02:00
parent 392ed5c4dd
commit b71a1eddf5
6 changed files with 82 additions and 8 deletions
+11 -2
View File
@@ -246,6 +246,9 @@ wivrn::vk_bundle::vk_bundle() :
#endif
#ifdef VK_KHR_video_encode_h265
VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME,
#endif
#ifdef VK_KHR_video_encode_intra_refresh
VK_KHR_VIDEO_ENCODE_INTRA_REFRESH_EXTENSION_NAME,
#endif
};
for (auto & ext: physical_device.enumerateDeviceExtensionProperties())
@@ -274,8 +277,9 @@ wivrn::vk_bundle::vk_bundle() :
});
#ifdef VK_KHR_video_maintenance1
auto [_, video_feat] = physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVideoMaintenance1FeaturesKHR>();
std::get<vk::PhysicalDeviceVideoMaintenance1FeaturesKHR>(feat).videoMaintenance1 = video_feat.videoMaintenance1;
if (has_device_ext(VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME))
std::get<vk::PhysicalDeviceVideoMaintenance1FeaturesKHR>(feat).videoMaintenance1 =
std::get<vk::PhysicalDeviceVideoMaintenance1FeaturesKHR>(physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVideoMaintenance1FeaturesKHR>()).videoMaintenance1;
#endif
}
#endif
@@ -287,6 +291,11 @@ wivrn::vk_bundle::vk_bundle() :
std::get<vk::PhysicalDeviceVulkan12Features>(feat).timelineSemaphore = phys_feat12.timelineSemaphore;
std::get<vk::PhysicalDeviceVulkan13Features>(feat).synchronization2 = phys_feat13.synchronization2;
#ifdef VK_KHR_video_encode_intra_refresh
if (has_device_ext(VK_KHR_VIDEO_ENCODE_INTRA_REFRESH_EXTENSION_NAME))
std::get<vk::PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR>(feat).videoEncodeIntraRefresh = std::get<vk::PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR>(physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR>()).videoEncodeIntraRefresh;
#endif
device = vk::raii::Device(
physical_device,
vk::DeviceCreateInfo{