From 382b8e3aa2989b87287fbc1902e8827dae400500 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: --- src/intel/vulkan/anv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index b4824de264d..eaa414da3da 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -828,7 +828,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 */