mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
vulkan: enable VK_KHR_maintenance11
Among other things, lifts the 4-byte alignment that transfer-only queue families require of buffer offsets in buffer-image copies.
This commit is contained in:
1 parent
d49fcd7f82
commit
e4373dd092
5 files changed
+24
No files matched your search
@@ -107,6 +107,9 @@ typedef struct VulkanDeviceFeatures {
|
||||
#ifdef VK_KHR_maintenance9
|
||||
VkPhysicalDeviceMaintenance9FeaturesKHR maintenance_9;
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
VkPhysicalDeviceMaintenance11FeaturesKHR maintenance_11;
|
||||
#endif
|
||||
#ifdef VK_KHR_unified_image_layouts
|
||||
VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR unified_layouts;
|
||||
#endif
|
||||
@@ -287,6 +290,10 @@ static void device_features_init(AVHWDeviceContext *ctx, VulkanDeviceFeatures *f
|
||||
FF_VK_STRUCT_EXT(s, &feats->device, &feats->maintenance_9, FF_VK_EXT_MAINTENANCE_9,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR);
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
FF_VK_STRUCT_EXT(s, &feats->device, &feats->maintenance_11, FF_VK_EXT_MAINTENANCE_11,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR);
|
||||
#endif
|
||||
#ifdef VK_KHR_unified_image_layouts
|
||||
FF_VK_STRUCT_EXT(s, &feats->device, &feats->unified_layouts, FF_VK_EXT_UNIFIED_IMAGE_LAYOUTS,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFIED_IMAGE_LAYOUTS_FEATURES_KHR);
|
||||
@@ -440,6 +447,9 @@ static void device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF
|
||||
#ifdef VK_KHR_maintenance9
|
||||
COPY_VAL(maintenance_9.maintenance9);
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
COPY_VAL(maintenance_11.maintenance11);
|
||||
#endif
|
||||
#ifdef VK_KHR_unified_image_layouts
|
||||
COPY_VAL(unified_layouts.unifiedImageLayouts);
|
||||
COPY_VAL(unified_layouts.unifiedImageLayoutsVideo);
|
||||
@@ -773,6 +783,9 @@ static const VulkanOptExtension optional_device_exts[] = {
|
||||
#ifdef VK_KHR_maintenance9
|
||||
{ VK_KHR_MAINTENANCE_9_EXTENSION_NAME, FF_VK_EXT_MAINTENANCE_9 },
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
{ VK_KHR_MAINTENANCE_11_EXTENSION_NAME, FF_VK_EXT_MAINTENANCE_11 },
|
||||
#endif
|
||||
#ifdef VK_KHR_unified_image_layouts
|
||||
{ VK_KHR_UNIFIED_IMAGE_LAYOUTS_EXTENSION_NAME, FF_VK_EXT_UNIFIED_IMAGE_LAYOUTS },
|
||||
#endif
|
||||
|
||||
@@ -191,6 +191,10 @@ int ff_vk_load_props(FFVulkanContext *s)
|
||||
FF_VK_STRUCT_EXT(s, &s->feats, &s->unified_layout_feats, FF_VK_EXT_UNIFIED_IMAGE_LAYOUTS,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFIED_IMAGE_LAYOUTS_FEATURES_KHR);
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
FF_VK_STRUCT_EXT(s, &s->feats, &s->maintenance_11_feats, FF_VK_EXT_MAINTENANCE_11,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR);
|
||||
#endif
|
||||
|
||||
if (!s->imageviews_pool) {
|
||||
s->imageviews_pool = av_refstruct_pool_alloc_ext(sizeof(FFVkImageViews), 0,
|
||||
|
||||
@@ -329,6 +329,9 @@ typedef struct FFVulkanContext {
|
||||
VkPhysicalDeviceVulkan12Features feats_12;
|
||||
#ifdef VK_KHR_unified_image_layouts
|
||||
VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR unified_layout_feats;
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
VkPhysicalDeviceMaintenance11FeaturesKHR maintenance_11_feats;
|
||||
#endif
|
||||
VkPhysicalDeviceFeatures2 feats;
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef uint64_t FFVulkanExtensions;
|
||||
#define FF_VK_EXT_MAXIMAL_RECONVERGENCE (1ULL << 24) /* VK_KHR_shader_maximal_reconvergence */
|
||||
#define FF_VK_EXT_MAINTENANCE_9 (1ULL << 25) /* VK_KHR_maintenance9 */
|
||||
#define FF_VK_EXT_UNIFIED_IMAGE_LAYOUTS (1ULL << 26) /* VK_KHR_unified_image_layouts */
|
||||
#define FF_VK_EXT_MAINTENANCE_11 (1ULL << 27) /* VK_KHR_maintenance11 */
|
||||
|
||||
/* Video extensions */
|
||||
#define FF_VK_EXT_VIDEO_QUEUE (1ULL << 36) /* VK_KHR_video_queue */
|
||||
|
||||
@@ -107,6 +107,9 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions,
|
||||
#endif
|
||||
#ifdef VK_KHR_internally_synchronized_queues
|
||||
{ VK_KHR_INTERNALLY_SYNCHRONIZED_QUEUES_EXTENSION_NAME, FF_VK_EXT_INTERNAL_QUEUE_SYNC },
|
||||
#endif
|
||||
#ifdef VK_KHR_maintenance11
|
||||
{ VK_KHR_MAINTENANCE_11_EXTENSION_NAME, FF_VK_EXT_MAINTENANCE_11 },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user