anv: Check if vkCreateQueryPool() is being created in a supported queue
Turns out not even VK CTS was calling vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR() to check if queue supports query. So here adding a explicity check in our implementation of vkCreateQueryPool(). https://github.com/KhronosGroup/VK-GL-CTS/pull/482 Cc: 24.2 <mesa-stable> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
This commit is contained in:

committed by
Marge Bot

parent
141e7eaca7
commit
dec5a624e9
@@ -146,9 +146,15 @@ VkResult genX(CreateQueryPool)(
|
||||
case VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR: {
|
||||
const struct intel_perf_query_field_layout *layout =
|
||||
&pdevice->perf->query_layout;
|
||||
const struct anv_queue_family *queue_family;
|
||||
|
||||
perf_query_info = vk_find_struct_const(pCreateInfo->pNext,
|
||||
QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR);
|
||||
/* Same restriction as in EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR() */
|
||||
queue_family = &pdevice->queue.families[perf_query_info->queueFamilyIndex];
|
||||
if (!queue_family->supports_perf)
|
||||
return vk_error(device, VK_ERROR_UNKNOWN);
|
||||
|
||||
n_passes = intel_perf_get_n_passes(pdevice->perf,
|
||||
perf_query_info->pCounterIndices,
|
||||
perf_query_info->counterIndexCount,
|
||||
|
Reference in New Issue
Block a user