nir: Handle out of bounds access in nir_vectorize_tess_levels.
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 6 Apr 2022 16:53:20 +0000 (18:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Apr 2022 13:25:10 +0000 (13:25 +0000)
commita7147ef1e86af5dbc39371885664f05030b3b418
treea58bd80d7b2b11e5a9e4e60762afda672a368ad3
parentb874a2ed61b056fd69fc2aa4cbf2291d95177b23
nir: Handle out of bounds access in nir_vectorize_tess_levels.

Replace out of bounds loads with undef.
Then, delete instructions with out of bounds access.

Fixes: f5adf27fb926a330a13af716f0a03da1a224656d "nir,radv: add and use nir_vectorize_tess_levels()"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6264
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15775>
src/compiler/nir/nir_lower_io_to_vector.c