lavapipe: skip "pipeline barriers" if they're first or last in a cmdbuf
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 12 May 2021 03:27:17 +0000 (23:27 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 27 May 2021 00:12:48 +0000 (00:12 +0000)
commitdf47ed074d3a85f34407b0ccb182a9e7466132b1
tree599ddee75534e27aa4ca30b3a1efe17c32304ffa
parent08a7cfce5e77511e4d2769faeecf415bbf789763
lavapipe: skip "pipeline barriers" if they're first or last in a cmdbuf

barriers just trigger a full flush, which is unnecessary if it's:
* the first cmd in a cmdbuf, as the previous cmdbuf will have already
  flushed and so this is flushing nothing
* the last cmd in a cmdbuf, as there will be a flush immediately after
  returning from this function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10762>
src/gallium/frontends/lavapipe/lvp_execute.c