mesa/st: glsl_to_nir: don't lower atomics to SSBOs if driver supports HW atomics
authorGert Wollny <gert.wollny@collabora.com>
Sat, 28 Dec 2019 15:07:30 +0000 (16:07 +0100)
committerGert Wollny <gw.fossdev@gmail.com>
Sat, 4 Jan 2020 16:22:40 +0000 (16:22 +0000)
commit9162e2f03fba0308f889e74036c77b127fddeba5
treee1ed5a3aebaf9ef760a08e894c89418ffb1d37f5
parentb119f8b4a050b2f37b0abbda669b7e27b0cd538b
mesa/st: glsl_to_nir: don't lower atomics to SSBOs if driver supports HW atomics

At least on r600 HW atomic operations are way less expensive than SSBO atomic
operations.

v2: use st->has_hw_atomics (Erik Anholt)

v3: remove second invocation of atomic to ssbo lowering (Erik Anholt)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
src/mesa/state_tracker/st_glsl_to_nir.cpp