From 29ee85c2039a202d522051b987e129efb00d18bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Wed, 6 Dec 2023 12:46:28 -0800 Subject: [PATCH] anv: Use intel_engines_supported_count() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Roberto de Souza Reviewed-by: Sagar Ghuge Part-of: --- src/intel/vulkan/anv_device.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index e2f009b6409..1c81a0d9539 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2021,24 +2021,25 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice) kernel_supports_non_render_engines && sparse_supports_non_render_engines; - if (debug_get_bool_option("INTEL_COMPUTE_CLASS", false)) { - if (!can_use_non_render_engines) - mesa_logw("cannot initialize compute engine"); - else - c_count = intel_engines_count(pdevice->engine_info, - INTEL_ENGINE_CLASS_COMPUTE); - } + if (!can_use_non_render_engines) + mesa_logw("cannot initialize compute engine"); + else + c_count = intel_engines_supported_count(pdevice->local_fd, + &pdevice->info, + pdevice->engine_info, + INTEL_ENGINE_CLASS_COMPUTE); enum intel_engine_class compute_class = c_count < 1 ? INTEL_ENGINE_CLASS_RENDER : INTEL_ENGINE_CLASS_COMPUTE; int blit_count = 0; - if (debug_get_bool_option("INTEL_COPY_CLASS", true) && - pdevice->info.verx10 >= 125) { + if (pdevice->info.verx10 >= 125) { if (!can_use_non_render_engines) mesa_logw("cannot initialize blitter engine"); else - blit_count = intel_engines_count(pdevice->engine_info, - INTEL_ENGINE_CLASS_COPY); + blit_count = intel_engines_supported_count(pdevice->local_fd, + &pdevice->info, + pdevice->engine_info, + INTEL_ENGINE_CLASS_COPY); } anv_override_engine_counts(&gc_count, &g_count, &c_count, &v_count);