mesa: Make atomic lowering put atomics above SSBOs.
authorEric Anholt <eric@anholt.net>
Fri, 20 Dec 2019 17:02:07 +0000 (09:02 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 21 Jan 2020 18:06:23 +0000 (10:06 -0800)
commit10dc4ac4c5d6dbe3df1f2b75229804e7aa5f86f1
treedb3ef64c6af9f850b7736f792254922e8246ee8d
parent2dc205515742d7da7ed3ca3b6005e1762a876254
mesa: Make atomic lowering put atomics above SSBOs.

Gallium arbitrarily (it seems) put atomics below SSBOs, resulting in a
bunch of extra index management, and surprising shader code when you would
see your SSBOs up at index 16.  It makes a lot more sense to see atomics
converted to SSBOs appear as magic high numbers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
src/compiler/nir/nir_lower_atomics_to_ssbo.c
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/state_tracker/st_atom_atomicbuf.c
src/mesa/state_tracker/st_atom_storagebuf.c
src/mesa/state_tracker/st_draw_feedback.c
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp