summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2022-06-09 21:17:01 +0300
committerMarge Bot <emma+marge@anholt.net>2022-06-23 22:47:37 +0000
commit9b11618dfa18230b01d5dc5ad773a34f2a568c56 (patch)
tree2ab1d7562f7807e16ed0f1ad649fecb5abadeea5
parentf00ebb913a80bd178b0b05231dd4ec883f997069 (diff)
anv: disable perf queries on non RCS engines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17015>
-rw-r--r--src/intel/vulkan/anv_perf.c9
1 files changed, 9 insertions, 0 deletions
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;