diff options
author | Jason Ekstrand <[email protected]> | 2018-12-13 12:37:59 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-08 00:38:30 +0000 |
commit | a1c688517dee32c57af17d8e11029eb7470f52d4 (patch) | |
tree | 4b3e14a6eab65c3f22ab94ea3e1d5ec3a46e80fa /src/compiler/glsl | |
parent | 427558a7178c704fd3102dc941d76316d9ca49e9 (diff) |
nir/opt_deref: Properly optimize ptr_as_array derefs
When handling casts, we can't blindly propagate the parent of a cast
into a ptr_as_array deref because doing so might loose the stride
information from the cast. Instead, before we can propagate into
ptr_as_array derefs, we need to check that the cast is a cast of an
array deref and that the stride matches. For other types of derefs, we
can continue to propagate casts as normal because they don't need the
stride. We also add an optimization which can combine a ptr_as_array
deref with it parent if it is also an array deref of some form.
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
0 files changed, 0 insertions, 0 deletions