From 3cd6ddf46c6366a7fe394a2e486fec645de101fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Wed, 13 Aug 2025 16:36:11 -0700 Subject: [PATCH] anv: check for pending_db_mode when dirtying descriptor mode If an application switches back and forth between descriptor sets and descriptor buffers before executing a draw/dispatch, we could end up in a wrong state due to pending_db_mode not getting updated. Fixes: ab7641b8dcb ("anv: implement descriptor buffer binding") Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 382b8e3aa2989b87287fbc1902e8827dae400500) --- .pick_status.json | 2 +- src/intel/vulkan/anv_cmd_buffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0b51d04f417..570e6567e87 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2824,7 +2824,7 @@ "description": "anv: check for pending_db_mode when dirtying descriptor mode", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ab7641b8dcbfee419b761abb27fe6fed476b4e05", "notes": null diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index d239ae32008..78465b4c2d9 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -762,7 +762,7 @@ static void anv_cmd_buffer_maybe_dirty_descriptor_mode(struct anv_cmd_buffer *cmd_buffer, enum anv_cmd_descriptor_buffer_mode new_mode) { - if (cmd_buffer->state.current_db_mode == new_mode) + if (cmd_buffer->state.pending_db_mode == new_mode) return; /* Ensure we program the STATE_BASE_ADDRESS properly at least once */