iris: Apply the flushes when switching pipelines.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 20 Feb 2020 19:02:52 +0000 (11:02 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 21:16:24 +0000 (21:16 +0000)
commita70a605ad63d95a6e7ce7cfd61fc1ca4e9616e74
tree819de9580e720956ce4a86f40d36ec524c4dd92d
parentf6d1dd34d76c1930b6f5223ae7e1c6b7f52ec4cd
iris: Apply the flushes when switching pipelines.

Even though the workaround description says:

   "all the listed commands are non-pipelined and hence flush caused due
   to pipeline mode change must not cause performance issues..."

My understanding is that we still need to have the flushes. Also, the
flushes are required not only to stall the pipeline, but also to clear
caches, so I don't think they can simply be discarded.

Additionally, while doing some testing that increased the number of
surface STATE_BASE_ADDRESS emitted, I got a lot more GPU hangs. Adding
these flushes fixes those hangs.

Fixes: b8fbb39a (iris: Implement Gen12 workaround for non pipelined
                 state)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3908>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3908>
src/gallium/drivers/iris/iris_state.c