mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
anv: Define bt_block only in the block that uses it in anv_cmd_buffer_alloc_binding_table()
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:
parent
d728c97022
commit
379617b77d
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue