spirv: Add better checks for SSA value types
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 29 May 2020 21:10:28 +0000 (16:10 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 24 Jul 2020 03:43:21 +0000 (22:43 -0500)
commitd0be2fed4edaa5f00433f41a0f4c660330348191
tree66a3466a641b935194f1e7f3ed79c3edad3982d1
parent47ebb50cab3bfd41000f517e83ad0bac57fc4085
spirv: Add better checks for SSA value types

Primarily, we check for two things:

 1. That we only ever add SSA values via vtn_push_ssa_value and
    vtn_copy_value.

 2. That the type of the SSA value matches the SPIR-V destination type.

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