nir/deref: copy ptr_stride when rematerializing

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
This commit is contained in:
Karol Herbst
2020-03-05 22:35:10 +01:00
committed by Marge Bot
parent a1b69d101a
commit 7afc9632a6

View File

@@ -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));