iris: Report use of any in-flight buffers on first draw call after sync boundary.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 7 Feb 2020 05:06:17 +0000 (21:06 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 23:12:22 +0000 (23:12 +0000)
commit4b7fd91be656ecc7944b7523b28246366cf5a8b7
treef26c622fe217dc87fa1dca6f8e507fa086ef59cb
parentae88e79f6959df71953db6314c78f68bd2799f3c
iris: Report use of any in-flight buffers on first draw call after sync boundary.

This is the main performance trade-off of this cache tracking
mechanism: In order for the seqno vector of buffer objects to be
accurate, they need to be marked as used again every time the batch is
split into a new synchronization section if they remain bound to the
pipeline.  This can be achieved easily by re-using
iris_restore_render_saved_bos() and iris_restore_compute_saved_bos(),
which currently serve a similar purpose across batch buffer
boundaries.

The impact on Piglit drawoverhead results seems to be within a
standard deviation of the current results.

XXX - It might be possible to completely remove the current
      iris_batch::contains_draw flag at a small additional performance
      cost.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
src/gallium/drivers/iris/iris_batch.h
src/gallium/drivers/iris/iris_state.c