Mesa (main): anv: disable perf queries on non RCS engines
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 23 23:16:54 UTC 2022
Module: Mesa
Branch: main
Commit: 9b11618dfa18230b01d5dc5ad773a34f2a568c56
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b11618dfa18230b01d5dc5ad773a34f2a568c56
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Thu Jun 9 21:17:01 2022 +0300
anv: disable perf queries on non RCS engines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17015>
---
src/intel/vulkan/anv_perf.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c
index 975b294b45d..1e5ca0cf953 100644
--- a/src/intel/vulkan/anv_perf.c
+++ b/src/intel/vulkan/anv_perf.c
@@ -357,6 +357,15 @@ VkResult anv_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterDescriptionKHR, out_desc,
pCounterDescriptions, &desc_count);
+ /* We cannot support performance queries on anything other than RCS,
+ * because the MI_REPORT_PERF_COUNT command is not available on other
+ * engines.
+ */
+ struct anv_queue_family *queue_family =
+ &pdevice->queue.families[queueFamilyIndex];
+ if (queue_family->engine_class != I915_ENGINE_CLASS_RENDER)
+ return vk_outarray_status(&out);
+
for (int c = 0; c < (perf ? perf->n_counters : 0); c++) {
const struct intel_perf_query_counter *intel_counter = perf->counter_infos[c].counter;
More information about the mesa-commit
mailing list