Mesa (master): anv: Re-use one old BT block in reset_batch_bo_chain
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 29 15:44:14 UTC 2020
Module: Mesa
Branch: master
Commit: ee4cdef9aeb7f2c576d9e6a31b1f07351829b795
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee4cdef9aeb7f2c576d9e6a31b1f07351829b795
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Tue Jan 28 16:21:56 2020 -0600
anv: Re-use one old BT block in reset_batch_bo_chain
We intentionally throw away all but one BT block but then we set
cmd_buffer->bt_block to ANV_STATE_NULL instead of the one we hung on to.
This causes the command buffer to immediately re-emit STATE_BASE_ADDRESS
the first time a BT is needed for no good reason.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/vulkan/anv_batch_chain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 5b64a53b6e1..1d4e853a91e 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -874,7 +874,8 @@ anv_cmd_buffer_reset_batch_bo_chain(struct anv_cmd_buffer *cmd_buffer)
anv_binding_table_pool_free(cmd_buffer->device, *bt_block);
}
assert(u_vector_length(&cmd_buffer->bt_block_states) == 1);
- cmd_buffer->bt_next = ANV_STATE_NULL;
+ cmd_buffer->bt_next = *(struct anv_state *)u_vector_head(&cmd_buffer->bt_block_states);
+ cmd_buffer->bt_next.offset = 0;
anv_reloc_list_clear(&cmd_buffer->surface_relocs);
cmd_buffer->last_ss_pool_center = 0;
More information about the mesa-commit
mailing list