spirv: Choose atomic deref type with pointer_uses_ssa_offset
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 15 Dec 2018 00:20:00 +0000 (18:20 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:30 +0000 (00:38 +0000)
commitbe039cb467635c6e2a70e29a586de7a5e403c929
treeafbcce8a2b3af467c62cd244f06f0079062632db
parent5c3cb9c3ce3f9fb05c22536c30a68a7b09300642
spirv: Choose atomic deref type with pointer_uses_ssa_offset

Previously, we hard-coded the rule about workgroup variables and the
builder lower_workgroup_access_to_offsets flag.  Instead base it on the
handy helper we have for exactly this sort of thing.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c