anv: Re-use one old BT block in reset_batch_bo_chain
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 28 Jan 2020 22:21:56 +0000 (16:21 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 29 Jan 2020 15:43:42 +0000 (09:43 -0600)
commitee4cdef9aeb7f2c576d9e6a31b1f07351829b795
treeaba254742e36ab5f55baffb1b019e16b2579841d
parenta2e9dd51b3db6c572bddb04b3efd54e733ac0915
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@intel.com>
src/intel/vulkan/anv_batch_chain.c