From bb121103591e7952fa69e9eba6faeb778969dd74 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 23 May 2025 09:08:54 +0300 Subject: [PATCH] anv: don't use pipeline layout at descriptor bind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An application is allowed to bind an empty descriptor set in a place where a pipeline layout has no descriptor set layout. For example : pipeline_layout_A : set0 : NULL set1 : descriptor_set_layout_A vkCmdBindDescriptor : set0 : descriptor_set_B (with layout bindingCount=0) set1 : descriptor_set_C (compatible with descriptor_set_layout_A) Signed-off-by: Lionel Landwerlin Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13227 Reviewed-by: Tapani Pälli Part-of: (cherry picked from commit 39f55541a3a5e56f86e3ce0a7f364ea1548bf733) --- .pick_status.json | 2 +- src/intel/vulkan/anv_cmd_buffer.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 2b43213182e..17a1b5b2497 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4894,7 +4894,7 @@ "description": "anv: don't use pipeline layout at descriptor bind", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 95be41cd07a..180791a2439 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -786,8 +786,7 @@ anv_cmd_buffer_bind_descriptor_set(struct anv_cmd_buffer *cmd_buffer, */ assert(!set->pool || !set->pool->host_only); - struct anv_descriptor_set_layout *set_layout = - layout ? layout->set[set_index].layout: set->layout; + struct anv_descriptor_set_layout *set_layout = set->layout; anv_cmd_buffer_maybe_dirty_descriptor_mode( cmd_buffer,