spirv: Allow constants and NULLs in SpvOpConvertUToPtr
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 22 Apr 2020 07:50:30 +0000 (02:50 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 09:23:59 +0000 (09:23 +0000)
commit64e4297629a1c4be501b40fb3529ff11441eff99
tree1a9cb4ce2898334c5d6da4d9db00e82f6f2c7ca0
parent4dc7b7627671eeaefda55b21bc9a7a5a06b43c30
spirv: Allow constants and NULLs in SpvOpConvertUToPtr

We were accidentally asserting that the value had to be a vtn_ssa_value
which isn't true if it, for instance, comes from a spec constant.

Fixes: fb282a68bc46 "spirv: Implement OpConvertPtrToU and OpConvertUToPtr"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4675>
src/compiler/spirv/vtn_variables.c