diff --git a/doc/APIchanges b/doc/APIchanges index 046828ded1..173f317ea1 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,15 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-08-10 - xxxxxxxxx - lavu 59.34.100 - hwcontext_vulkan.h + Add qf and nb_qf to AVVulkanDeviceContext. + Deprecate queue_family_index, nb_graphics_queues, + queue_family_tx_index, nb_tx_queues. + queue_family_comp_index, nb_comp_queues. + queue_family_encode_index, nb_encode_queues. + queue_family_decode_index, and nb_decode_queues, + from AVVulkanDeviceContext. + 2024-07-30 - xxxxxxxxx - lavu 59.32.100 - cpu.h Deprecate AV_CPU_FLAG_RVF and AV_CPU_FLAG_RVD without replacement. Deprecate AV_CPU_FLAG_RVB_ADDR, subsumed into AV_CPU_FLAG_RVB. diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 05fadd1b55..59d519727b 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1228,6 +1228,8 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) }; } +#if FF_API_VULKAN_FIXED_QUEUES +FF_DISABLE_DEPRECATION_WARNINGS /* Setup deprecated fields */ hwctx->queue_family_index = -1; hwctx->queue_family_comp_index = -1; @@ -1252,6 +1254,8 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) } #undef SET_OLD_QF +FF_ENABLE_DEPRECATION_WARNINGS +#endif return 0; } @@ -1611,6 +1615,8 @@ static int vulkan_device_init(AVHWDeviceContext *ctx) } } +#if FF_API_VULKAN_FIXED_QUEUES +FF_DISABLE_DEPRECATION_WARNINGS graph_index = hwctx->nb_graphics_queues ? hwctx->queue_family_index : -1; comp_index = hwctx->nb_comp_queues ? hwctx->queue_family_comp_index : -1; tx_index = hwctx->nb_tx_queues ? hwctx->queue_family_tx_index : -1; @@ -1678,6 +1684,8 @@ static int vulkan_device_init(AVHWDeviceContext *ctx) ADD_QUEUE(hwctx->queue_family_encode_index, hwctx->nb_encode_queues, VK_QUEUE_VIDEO_ENCODE_BIT_KHR); #undef ADD_QUEUE } +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (int i = 0; i < hwctx->nb_qf; i++) { if (!hwctx->qf[i].video_caps && diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h index 7959a84592..55647f1705 100644 --- a/libavutil/hwcontext_vulkan.h +++ b/libavutil/hwcontext_vulkan.h @@ -113,6 +113,7 @@ typedef struct AVVulkanDeviceContext { const char * const *enabled_dev_extensions; int nb_enabled_dev_extensions; +#if FF_API_VULKAN_FIXED_QUEUES /** * Queue family index for graphics operations, and the number of queues * enabled for it. If unavaiable, will be set to -1. Not required. @@ -120,21 +121,27 @@ typedef struct AVVulkanDeviceContext { * queue family, or pick the one with the least unrelated flags set. * Queue indices here may overlap if a queue has to share capabilities. */ + attribute_deprecated int queue_family_index; + attribute_deprecated int nb_graphics_queues; /** * Queue family index for transfer operations and the number of queues * enabled. Required. */ + attribute_deprecated int queue_family_tx_index; + attribute_deprecated int nb_tx_queues; /** * Queue family index for compute operations and the number of queues * enabled. Required. */ + attribute_deprecated int queue_family_comp_index; + attribute_deprecated int nb_comp_queues; /** @@ -142,7 +149,9 @@ typedef struct AVVulkanDeviceContext { * If the device doesn't support such, queue_family_encode_index will be -1. * Not required. */ + attribute_deprecated int queue_family_encode_index; + attribute_deprecated int nb_encode_queues; /** @@ -150,8 +159,11 @@ typedef struct AVVulkanDeviceContext { * If the device doesn't support such, queue_family_decode_index will be -1. * Not required. */ + attribute_deprecated int queue_family_decode_index; + attribute_deprecated int nb_decode_queues; +#endif /** * Locks a queue, preventing other threads from submitting any command diff --git a/libavutil/version.h b/libavutil/version.h index de8938e811..84eb3a388a 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -114,6 +114,7 @@ #define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60) #define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60) #define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 60) +#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 60) /** * @}