aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2020-03-05 22:35:10 +0100
committerMarge Bot <[email protected]>2020-05-14 15:13:13 +0000
commit7afc9632a6d03ed8d23fbab08b564da594b9cfd6 (patch)
treec137e1bcccfac497a58c93884af4b93379a7849e /src/compiler
parenta1b69d101a60974c105df8519890e3f90fd44911 (diff)
nir/deref: copy ptr_stride when rematerializing
Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_deref.c5
1 files changed, 4 insertions, 1 deletions
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));