spirv: Add vtn_mode_to_address_format()
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 3 May 2019 19:42:39 +0000 (12:42 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
commit672a3f42d91534a4a77ba5da10a66871734d7953
tree6f0baecb1063d0ca75f08bdf2799310ee8d9c7bd
parent192daf68a4358a3a24767d1f6733e8ed8e8d8390
spirv: Add vtn_mode_to_address_format()

Handles all the modes and we can use it in combination with
nir_address_format_to_glsl_type() to replace the
vtn_ptr_type_for_mode() helper.  Since the new helper is more generic,
moved the assertions from the old one to the call sites.

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