1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

vulkan: don't query video queue properties unless the extension is enabled

Fixes validation errors.
This commit is contained in:
Lynne
2025-02-19 13:18:54 +00:00
parent 542a567d50
commit b6bf568a44
2 changed files with 3 additions and 3 deletions

View File

@ -1418,7 +1418,7 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
}; };
qf[i] = (VkQueueFamilyProperties2) { qf[i] = (VkQueueFamilyProperties2) {
.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, .sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
.pNext = &qf_vid[i], .pNext = p->vkctx.extensions & FF_VK_EXT_VIDEO_QUEUE ? &qf_vid[i] : NULL,
}; };
} }
@ -1798,7 +1798,7 @@ static int vulkan_device_init(AVHWDeviceContext *ctx)
}; };
qf[i] = (VkQueueFamilyProperties2) { qf[i] = (VkQueueFamilyProperties2) {
.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, .sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
.pNext = &qf_vid[i], .pNext = p->vkctx.extensions & FF_VK_EXT_VIDEO_QUEUE ? &qf_vid[i] : NULL,
}; };
} }

View File

@ -189,7 +189,7 @@ int ff_vk_load_props(FFVulkanContext *s)
}; };
s->qf_props[i] = (VkQueueFamilyProperties2) { s->qf_props[i] = (VkQueueFamilyProperties2) {
.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, .sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
.pNext = &s->video_props[i], .pNext = s->extensions & FF_VK_EXT_VIDEO_QUEUE ? &s->video_props[i] : NULL,
}; };
} }