libavutil: deprecate the old Vulkan queue API, add doc/APIchanges entries

This commit is contained in:
Lynne 2024-08-10 17:46:04 +02:00
parent 83cd77563f
commit 5f0f1f7b7a
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
4 changed files with 30 additions and 0 deletions

View File

@ -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.

View File

@ -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 &&

View File

@ -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

View File

@ -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)
/**
* @}