spirv: Reuse helpers in vtn_handle_type()
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 8 May 2019 20:16:13 +0000 (13:16 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
commit83550b7dc437f496eea090b938d3ba599c0db016
tree00b5e7cd3dfaaeec74aea4f01024a549a5d5fc7c
parent48ea3bbff6ad1ce9f028097660da6c2d30338fe5
spirv: Reuse helpers in vtn_handle_type()

And change vtn_storage_class_to_mode() to accept NULL as
interface_type.  In this case, if we have a SpvStorageClassUniform, we
assume it is uses an ubo_addr_format, like the code being replaced by
the helper.

That assumption is a problem, but no different than the previous
code.

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