spirv: Make better use of vtn_pointer_uses_ssa_offset
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 15 Dec 2018 00:25:38 +0000 (18:25 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:30 +0000 (00:38 +0000)
commit3a7c5667c83f3a3f820a28af0e428bdfd010bd28
tree855f27573d9ffa3da48e6866d7546726fc27afe0
parentadc155a8156ee4df18c66bc44587a6880a70bdd7
spirv: Make better use of vtn_pointer_uses_ssa_offset

The choice of whether or not we should use block_load/store isn't a
choice between external and not so much as a choice between deref
instructions and manually calculated offsets.  In vtn_pointer_from_ssa,
we guard the index+offset case behind vtn_pointer_uses_ssa_offset and
then branch out from there.

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