spirv: Change vtn_null_constant() to use vtn_type
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 2 May 2019 22:57:45 +0000 (15:57 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
commit8af9de0a38ff9ed2e50a9ad05a3e21551f211f0b
tree59102a7414410c1df0910c218d707e4dab48c976
parentbdf2361b87844cd5697aa895bc71b28b0d396c86
spirv: Change vtn_null_constant() to use vtn_type

This is a preparation to handle OpConstantNull for pointers, we'll use
the vtn_type to get to the address format and then the appropriate
representation of NULL pointer.

v2: Move rest of body to use vtn_type. (Jason)

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