iris: Make sure a bound resource is flushed after iris_dirty_for_history.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 29 May 2020 23:19:06 +0000 (16:19 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 2 Sep 2021 03:14:37 +0000 (03:14 +0000)
commitdfef775c8adba850f97cd24522cbdb5131a8c307
treef6e0d99ac1fa0d27c49778f29dfe8c34d5471ca5
parent9f1053a1f399324d626bf4946c1f6d6263ab027c
iris: Make sure a bound resource is flushed after iris_dirty_for_history.

This is the last step before we can start removing the history flush
mechanism: In cases where a dirtied buffer has the potential to be
concurrently bound to the pipeline (as indicated by the bind_history
mask), flag the "flush" dirty bits corresponding to its binding point.
This ensures that the buffer-local memory barriers introduced earlier
in this series are executed before the next draw call, which in turn
will emit any necessary PIPE_CONTROLs in cases where the buffer is
bound through a cache incoherent with the cache that performed the
write.

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