spirv: Generate proper NULL pointer values
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 1 May 2019 22:57:40 +0000 (15:57 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
commit7e5723d6d7631604116b3cef4ab571200e1820d4
tree5a403386403816099a42d1411698f61a6bb9fb36
parent83550b7dc437f496eea090b938d3ba599c0db016
spirv: Generate proper NULL pointer values

Use the storage class address format information to pick the right
constant values for a NULL pointer.

v2: Don't add a deref_cast to the values.  (Jason)

v3: Update to use vtn_storage_class_to_mode() and
    vtn_mode_to_address_format() explicitly.  (Jason)

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