diff --git a/src/vulkan/runtime/vk_query_pool.c b/src/vulkan/runtime/vk_query_pool.c index 59294f414f3..0be3232aaa6 100644 --- a/src/vulkan/runtime/vk_query_pool.c +++ b/src/vulkan/runtime/vk_query_pool.c @@ -27,6 +27,7 @@ #include "vk_command_buffer.h" #include "vk_common_entrypoints.h" #include "vk_device.h" +#include "vk_util.h" void vk_query_pool_init(struct vk_device *device, @@ -42,6 +43,13 @@ vk_query_pool_init(struct vk_device *device, query_pool->pipeline_statistics = pCreateInfo->queryType == VK_QUERY_TYPE_PIPELINE_STATISTICS ? pCreateInfo->pipelineStatistics : 0; + + if (pCreateInfo->queryType == VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR) { + const struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR *feedback_info = + vk_find_struct_const(pCreateInfo->pNext, QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR); + if (feedback_info) + query_pool->encode_feedback_flags = feedback_info->encodeFeedbackFlags; + } } void * diff --git a/src/vulkan/runtime/vk_query_pool.h b/src/vulkan/runtime/vk_query_pool.h index ee04eee9ff6..70588ec4fdc 100644 --- a/src/vulkan/runtime/vk_query_pool.h +++ b/src/vulkan/runtime/vk_query_pool.h @@ -43,6 +43,13 @@ struct vk_query_pool { * If query_type != VK_QUERY_TYPE_PIPELINE_STATISTICS, this will be zero. */ VkQueryPipelineStatisticFlags pipeline_statistics; + + /** VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::encodeFeedbackFlags + * + * If query_type != VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, this will be + * zero. + */ + VkVideoEncodeFeedbackFlagsKHR encode_feedback_flags; }; void vk_query_pool_init(struct vk_device *device,