mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
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>
(cherry picked from commit dec5a624e9)
This commit is contained in:
parent
0eaba0ef77
commit
2ba449a76c
2 changed files with 7 additions and 1 deletions
|
|
@ -4514,7 +4514,7 @@
|
|||
"description": "anv: Check if vkCreateQueryPool() is being created in a supported queue",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue