From: Karol Herbst Date: Thu, 5 Mar 2020 21:35:10 +0000 (+0100) Subject: nir/deref: copy ptr_stride when rematerializing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7afc9632a6d03ed8d23fbab08b564da594b9cfd6;p=mesa.git nir/deref: copy ptr_stride when rematerializing Signed-off-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index e06fd07aeb2..09eaa524e42 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -657,10 +657,13 @@ rematerialize_deref_in_block(nir_deref_instr *deref, switch (deref->deref_type) { case nir_deref_type_var: case nir_deref_type_array_wildcard: - case nir_deref_type_cast: /* Nothing more to do */ break; + case nir_deref_type_cast: + new_deref->cast.ptr_stride = deref->cast.ptr_stride; + break; + case nir_deref_type_array: case nir_deref_type_ptr_as_array: assert(!nir_src_as_deref(deref->arr.index));