nir: Allow casts in nir_deref_instr_get[_const]_offset()
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 29 Jun 2020 13:36:49 +0000 (15:36 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 30 Jul 2020 15:11:43 +0000 (17:11 +0200)
commitdd155aef4404994ffc36a63f14fb2ba3f48c0ae5
treee7188e0ba1fd492cb4924d8c362ec407350d49cb
parent6a1382399cbcdab1a3f1fcbec49ad9964961e904
nir: Allow casts in nir_deref_instr_get[_const]_offset()

Allow casts in a deref chain so we can calculate an offset from
a base pointer dereference or have pointer type casts in the
middle of the chain (both are pretty common in CL).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5682>
src/compiler/nir/nir_deref.c