OPTIONAL: iris: Perform BLORP buffer barriers outside of iris_blorp_exec() hook.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 6 May 2020 22:40:30 +0000 (15:40 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 23:12:22 +0000 (23:12 +0000)
commit8252bb0ec6d429b09d944826d1ddbead69387f0f
tree42b41c0c94a42fc2f650ee6093d58f4f0f8e5847
parent4b00338bdee7f91f242a1152327cd01fe58c56bd
OPTIONAL: iris: Perform BLORP buffer barriers outside of iris_blorp_exec() hook.

The iris_blorp_exec() hook needs to be executed under a single
indivisible sync region, which means that in cases where we need to
emit a PIPE_CONTROL for a buffer barrier we won't be able to track the
subsequent commands separately from the previous commands, which will
prevent us from optimizing out subsequent PIPE_CONTROLs if we
encounter the same buffers again.  In particular I've encountered this
situation in some SynMark test-cases which perform lots of BLORP
operations with the same buffer bound as both source and destination
(in order to generate mipmaps): In such a scenario if the source
requires flushing we'd also end up flushing for the destination
redundantly, even though a single PIPE_CONTROL would have been
sufficient.

This avoids a 4.5% FPS regression in SynMark OglHdrBloom and a 3.5%
FPS regression in SynMark OglMultithread.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
src/gallium/drivers/iris/iris_blit.c
src/gallium/drivers/iris/iris_blorp.c
src/gallium/drivers/iris/iris_clear.c
src/gallium/drivers/iris/iris_resolve.c