nir: lower_non_uniform_access: iterate over instructions safely
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 15 May 2019 22:02:51 +0000 (23:02 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 16 May 2019 09:22:01 +0000 (10:22 +0100)
commite04cf0b61269ca60b3260d81d94e625965d39901
tree4dc3e4d2af286528bec2fe6f904bc0f30dcb6c10
parent752367b76640fe4fbd6dbb98c1d9bff53c0db993
nir: lower_non_uniform_access: iterate over instructions safely

This pass moves instructions around and adds control-flow in the
middle of blocks. We need to use nir_foreach_instr_safe to ensure that
we iterate over instructions correctly anyway.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3bd545764151 ("nir: Add a lowering pass for non-uniform resource access")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_non_uniform_access.c