History

hwcontext_vulkan: enable VK_KHR_video_maintenance2

Enables some fixes for the video specifications, and a new feature.

Lynne committed 1 year ago

Commit 67eb01b1 parent e15e85b2 files · +14 −0Browse files

Unified · Split

2 files
  1. libavutil/hwcontext_vulkan.c +13 −0
  2. libavutil/vulkan_functions.h +1 −0
libavutil/hwcontext_vulkan.c+13−0
@@ -81,6 +81,9 @@ typedef struct VulkanDeviceFeatures { · 80 unmodified lines
8181 VkPhysicalDeviceTimelineSemaphoreFeatures timeline_semaphore;
8282
8383 VkPhysicalDeviceVideoMaintenance1FeaturesKHR video_maintenance_1;
84+#ifdef VK_KHR_video_maintenance2
85+ VkPhysicalDeviceVideoMaintenance2FeaturesKHR video_maintenance_2;
86+#endif
8487
8588 VkPhysicalDeviceShaderObjectFeaturesEXT shader_object;
8689 VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperative_matrix;
@@ -208,6 +211,10 @@ static void device_features_init(AVHWDeviceContext *ctx, VulkanDeviceFeatures *f · 121 unmodified lines
208211
209212 OPT_CHAIN(&feats->video_maintenance_1, FF_VK_EXT_VIDEO_MAINTENANCE_1,
210213 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR);
214+#ifdef VK_KHR_video_maintenance2
215+ OPT_CHAIN(&feats->video_maintenance_2, FF_VK_EXT_VIDEO_MAINTENANCE_2,
216+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR);
217+#endif
211218
212219 OPT_CHAIN(&feats->shader_object, FF_VK_EXT_SHADER_OBJECT,
213220 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT);
@@ -276,6 +283,9 @@ static void device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF · 62 unmodified lines
276283 COPY_VAL(timeline_semaphore.timelineSemaphore);
277284
278285 COPY_VAL(video_maintenance_1.videoMaintenance1);
286+#ifdef VK_KHR_video_maintenance2
287+ COPY_VAL(video_maintenance_2.videoMaintenance2);
288+#endif
279289
280290 COPY_VAL(shader_object.shaderObject);
281291
@@ -605,6 +615,9 @@ static const VulkanOptExtension optional_device_exts[] = { · 323 unmodified lines
605615 { VK_NV_OPTICAL_FLOW_EXTENSION_NAME, FF_VK_EXT_OPTICAL_FLOW },
606616 { VK_EXT_SHADER_OBJECT_EXTENSION_NAME, FF_VK_EXT_SHADER_OBJECT },
607617 { VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME, FF_VK_EXT_VIDEO_MAINTENANCE_1 },
618+#ifdef VK_KHR_video_maintenance2
619+ { VK_KHR_VIDEO_MAINTENANCE_2_EXTENSION_NAME, FF_VK_EXT_VIDEO_MAINTENANCE_2 },
620+#endif
608621
609622 /* Imports/exports */
610623 { VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_FD_MEMORY },
libavutil/vulkan_functions.h+1−0
@@ -50,6 +50,7 @@ typedef uint64_t FFVulkanExtensions; · 49 unmodified lines
5050 /* Video extensions */
5151 #define FF_VK_EXT_VIDEO_QUEUE (1ULL << 36) /* VK_KHR_video_queue */
5252 #define FF_VK_EXT_VIDEO_MAINTENANCE_1 (1ULL << 37) /* VK_KHR_video_maintenance1 */
53+#define FF_VK_EXT_VIDEO_MAINTENANCE_2 (1ULL << 38) /* VK_KHR_video_maintenance2 */
5354
5455 #define FF_VK_EXT_VIDEO_DECODE_QUEUE (1ULL << 40) /* VK_KHR_video_decode_queue */
5556 #define FF_VK_EXT_VIDEO_DECODE_H264 (1ULL << 41) /* VK_KHR_video_decode_h264 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t