spirv: Simplify vtn_ssa_value creation
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 30 May 2020 17:23:50 +0000 (12:23 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 24 Jul 2020 03:43:21 +0000 (22:43 -0500)
commit085ade412554c1e1e55aee5a4267bd13ec432d10
tree54bf962a25360f27822b3283ef23197c2d83e1c5
parent00af1128a9d555a09e18eb3fd8ce1829d94509b7
spirv: Simplify vtn_ssa_value creation

For three different functions which create vtn_ssa_values, we had three
completely different implementations.  This unifies them all to roughly
the same algorithm.  While we're at it, we take advantage of the
nir_build_imm helper to avoid some extra code in vtn_const_ssa_value.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>
src/compiler/spirv/spirv_to_nir.c