zink: add clear-on-flush mechanic deeper into flush codepath

we should probably trigger this any time a flush occurs just to avoid
doing too much (unexpected) cmdstream rewriting

both calls must be kept, however, as the one in the base flush hook will change
the behavior of flushing if no other work is queued

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
(cherry picked from commit 04241e826eabf9fab16596d0454fffb48d476c93)
2 files changed