compiler/spirv: Add support for non-constant initializers
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Tue, 10 Dec 2019 20:53:15 +0000 (15:53 -0500)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 12 Feb 2020 15:41:49 +0000 (15:41 +0000)
commite459c7f0a14b65617e16b92f42abad2fe5878872
tree27c8caba6a283fde3a658f8ca497f3223383c1db
parent7acc81056f7ac6a869ef6403573b2572c77dbecf
compiler/spirv: Add support for non-constant initializers

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>
src/compiler/spirv/vtn_variables.c