anv: Define bt_block only in the block that uses it in anv_cmd_buffer_alloc_binding_table()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37669>
This commit is contained in:
José Roberto de Souza 2025-08-15 12:13:53 -07:00 committed by Marge Bot
parent d728c97022
commit 379617b77d

View file

@ -706,8 +706,6 @@ anv_cmd_buffer_alloc_binding_table(struct anv_cmd_buffer *cmd_buffer,
if (u_vector_length(&cmd_buffer->bt_block_states) == 0)
return (struct anv_state) { 0 };
struct anv_state *bt_block = u_vector_head(&cmd_buffer->bt_block_states);
uint32_t bt_size = align(entries * 4, 32);
struct anv_state state = cmd_buffer->bt_next;
@ -726,6 +724,8 @@ anv_cmd_buffer_alloc_binding_table(struct anv_cmd_buffer *cmd_buffer,
*/
*state_offset = 0;
} else {
struct anv_state *bt_block = u_vector_head(&cmd_buffer->bt_block_states);
assert(bt_block->offset < 0);
*state_offset = -bt_block->offset;
}