anv: end command buffer with a potential jump
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 9 Dec 2020 11:19:30 +0000 (13:19 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 27 Feb 2021 11:29:07 +0000 (13:29 +0200)
commit882fc7244212048059beaf2ddf411a50ba3c80c3
tree4c07e3bb974d33deae6e7c112006c831c365a66f
parent8446f4733fd0a4efb692e0202a50ce96946b12e7
anv: end command buffer with a potential jump

We would like to chain multiple primary command buffer to be submitted
together to i915. For prepare this, add end the command buffers with a
MI_BATCH_BUFFER_START and at submit time, replace it with
MI_BATHC_BUFFER_END if needed.

v2: Don't even consider non softpin platforms

v3: Fix inverted condition

v4: Limit is_chainable() to checking device->use_softpin (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_private.h