nir/opt_barriers: Add a default callback
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 23 May 2023 18:12:19 +0000 (14:12 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 17:30:03 +0000 (17:30 +0000)
commit2da3a6e1b9644e4452388f83f3c5f64fc1da9bbe
treec0054ea3ade0f60cd43bd38f74df884c003241a2
parentecd295bb8bfbc4c9d271ee8e8b4330b86876f8c2
nir/opt_barriers: Add a default callback

Absent any knowledge about the hardware, if the backend wants to combine
barriers we should try to combine all barriers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23181>
src/compiler/nir/nir_opt_barriers.c