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: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36768>
This commit is contained in:
Iván Briano 2025-08-13 16:36:11 -07:00 committed by Marge Bot
parent 0ac7f1888f
commit 382b8e3aa2

View file

@ -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 */