spirv: Add vtn_mode_uses_ssa_offset()
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 3 May 2019 05:11:31 +0000 (22:11 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
commit192daf68a4358a3a24767d1f6733e8ed8e8d8390
tree68ffbbc8763feab5abc30242ab5dbfb93f71e299
parentf9336751bc0c0977b26a58faa13ce37fd0bd5b08
spirv: Add vtn_mode_uses_ssa_offset()

Just the mode is needed to decide whether SSA offsets are needed, so
make a function that takes that and reuse it for
vtn_pointer_uses_ssa_offset().

This will be used for constant null pointers, that won't have a
vtn_pointer handy.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c