compiler/spirv: Add support for non-constant initializers

Cherry-pick'd from e459c7f0a14b65617e16b92f42abad2fe5878872

This adds support for OpVariable having an initializer that points to
another variable, rather than a constant. In this case, the variable is
initialized to a pointer to the other variable.

Fixes Vulkan CTS tests:
dEQP-VK.spirv_assembly.instruction.compute.variable_init.private.*

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047>
Change-Id: I6b5aed48a13179342b3721b227ea731a026db9b2
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/403111
Reviewed-by: John Bauman <jbauman@google.com>
1 file changed