nir: Handle incomplete derefs in split_struct_vars
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 29 Sep 2020 15:30:52 +0000 (10:30 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 3 Nov 2020 22:18:28 +0000 (22:18 +0000)
commit5664713d7b99b99dcee1d009ef6e5b105a2d65ee
treeed5d98d2804b00915a78b8cc5868aba0e7fd2659
parent6b72004f12c8db56ae6838e0fdb74d416e918928
nir: Handle incomplete derefs in split_struct_vars

In split_var_list_structs where we initalize the splitting, we already
use get_complex_used_vars to avoid splitting any variables that have a
complex use.  However, we weren't actually handling the complex uses
properly in the case where we can't actually find the variable.

Fixes: f1cb3348f1 "nir/split_vars: Properly bail in the presence of ..."
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>
src/compiler/nir/nir_split_vars.c