radeonsi: clean up and deduplicate code around internal compute dispatches
authorMarek Olšák <marek.olsak@amd.com>
Sun, 26 Apr 2020 11:22:52 +0000 (07:22 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Apr 2020 22:27:31 +0000 (22:27 +0000)
commit44d27fd6fba92a3b11c10d06f1b3babeffbcd4bb
treeef4adf48da3e941736e614f5269792cf3f15f1dd
parente58dcc47c3bd4d3f22e9d0a943e339b4866bc616
radeonsi: clean up and deduplicate code around internal compute dispatches

In addition to the cleanup, there are these changes in behavior:
- clear_render_target waits for idle after the dispatch and then flushes
  L0-L1 caches (this was missing)
- sL0 is no longer invalidated before the dispatch, because src resources
  don't use it
- sL0 is no longer invalidated after the dispatch if dst is an image

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4761>
src/gallium/drivers/radeonsi/si_compute_blit.c