From 22a9e596853eb7ab88c6fb621b5c9c58a9f5a864 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 21 Jun 2024 17:51:34 +0300 Subject: [PATCH] anv: fixup compute queue detection I ran into this case where genX(cmd_buffer_emit_bt_pool_base_address) was returning immediately because it considered an RCS engine emulating a compute queue as neither a render nor a compute queue. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Kenneth Graunke (cherry picked from commit d581b7282bb4c5a99fd5783dacede223f04391d8) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/anv_private.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b01de679177..b6cda7655b2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3964,7 +3964,7 @@ "description": "anv: fixup compute queue detection", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 1bc7bf6cce0..9784622c572 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4988,7 +4988,12 @@ static inline bool anv_cmd_buffer_is_compute_queue(const struct anv_cmd_buffer *cmd_buffer) { struct anv_queue_family *queue_family = cmd_buffer->queue_family; - return queue_family->engine_class == INTEL_ENGINE_CLASS_COMPUTE; + /* Either it's a RCS engine masquerading as a compute queue, or it's an + * actual CCS. + */ + return ((queue_family->queueFlags & VK_QUEUE_GRAPHICS_BIT) == 0 && + queue_family->engine_class == INTEL_ENGINE_CLASS_RENDER) || + queue_family->engine_class == INTEL_ENGINE_CLASS_COMPUTE; } static inline bool