diff options
author | Niklas Haas <git@haasn.dev> | 2025-08-05 23:18:21 +0200 |
---|---|---|
committer | Niklas Haas <ffmpeg@haasn.dev> | 2025-08-20 15:05:41 +0000 |
commit | 78beb4f5f40c7fbd7fd89c93b8a10f0a08281eb1 (patch) | |
tree | 47e12cfa21a4366fa982d8409c181ee64bd82e91 /libavutil | |
parent | 881224b21324e5f0c43569928cf96f0e92a686e2 (diff) | |
download | ffmpeg-78beb4f5f40c7fbd7fd89c93b8a10f0a08281eb1.tar.gz |
avutil/hwcontext_vulkan: don't re-query driver props in qf setup
This is already queried when the device is selected, so there's no need
to re-query the exact same struct.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 4e078eb527..4c7e81d540 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1463,13 +1463,6 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) VulkanDevicePriv *p = ctx->hwctx; AVVulkanDeviceContext *hwctx = &p->p; FFVulkanFunctions *vk = &p->vkctx.vkfn; - VkPhysicalDeviceDriverProperties dprops = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, - }; - VkPhysicalDeviceProperties2 props2 = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, - .pNext = &dprops, - }; VkQueueFamilyProperties2 *qf = NULL; VkQueueFamilyVideoPropertiesKHR *qf_vid = NULL; @@ -1523,13 +1516,6 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) hwctx->nb_qf = 0; - /* NVIDIA's proprietary drivers have stupid limits, where each queue - * you allocate takes tens of milliseconds, and the more queues you - * allocate, the less you'll have left before initializing a device - * simply fails (112 seems to be the max). GLOBALLY. - * Detect this, and minimize using queues as much as possible. */ - vk->GetPhysicalDeviceProperties2(hwctx->phys_dev, &props2); - /* Pick each queue family to use. */ #define PICK_QF(type, vid_op) \ do { \ @@ -1555,7 +1541,7 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) hwctx->qf[i].idx = idx; \ hwctx->qf[i].num = qf[idx].queueFamilyProperties.queueCount; \ if (p->limit_queues || \ - dprops.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) { \ + p->dprops.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) { \ int max = p->limit_queues; \ if (type == VK_QUEUE_GRAPHICS_BIT) \ hwctx->qf[i].num = FFMIN(hwctx->qf[i].num, \ |