spirv: Handle arbitrary bit sizes for deref array indices
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 14 Dec 2018 17:06:07 +0000 (11:06 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:29 +0000 (00:38 +0000)
commitabfe674c54bee6f8fdcae411b07db89c10b9d530
tree94b3bb6fcd643e4e604afe06b809b2507d3494a3
parentbfe31c5e461a1330d6f606bf5310685eff1198dd
spirv: Handle arbitrary bit sizes for deref array indices

We already had code in link_as_ssa to handle bit sizes; we just need to
use it.  While we're at it we clean up link_as_ssa a bit and add an
explicit bit_size parameter in preparation for a day when we have derefs
that aren't 32 bit.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c