st/nir: fix atomic lowering for gallium drivers
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 19 Mar 2018 11:23:55 +0000 (22:23 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 20 Mar 2018 03:29:53 +0000 (14:29 +1100)
commitdfe2f198550b262186e2882d7e573f1f3759deb7
treedd7c18930f0046c69438490cd16b99cd0744cd8c
parent632d5e97efa3d38155d290fa397af7a729de8682
st/nir: fix atomic lowering for gallium drivers

i965 and gallium handle the atomic buffer index differently. It was
just by luck that the single piglit test for this was passing.

For gallium we use the atomic binding so that we match the handling
in st_bind_atomics().

On radeonsi this fixes the CTS test:
KHR-GL43.shader_storage_buffer_object.advanced-write-fragment

It also fixes tressfx hair rendering in Tomb Raider.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_atomics.c
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/state_tracker/st_glsl_to_nir.cpp