spirv: Don't emit RMW for vector indexing in shared or global
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 17 Aug 2020 15:51:32 +0000 (10:51 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 Aug 2020 20:22:05 +0000 (20:22 +0000)
commitb479de8537ad34ec56d61f87d53a327a175eab36
treebe0b8b702ce0ddda0dbd39d3c09ef57228cefa35
parentf038b3a136175c0afcc6545b886238a7b5dcf515
spirv: Don't emit RMW for vector indexing in shared or global

Anything that fails the is_external_block check is getting the
vtn_local_load/store path which does read-modify-write which isn't
correct if the variable mode can be written cross-workgroup.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6372>
src/compiler/spirv/vtn_variables.c