nir/sink: Don't sink load_ubo to outside of its defining loop
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 25 Sep 2019 12:17:23 +0000 (14:17 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Wed, 9 Oct 2019 17:55:25 +0000 (17:55 +0000)
commit5ac32b2954ad78ecfb8ee8d90e13a3d3928f5396
treea7064ade8e3d56fd4c36ec1c278c087bc1ec9552
parentaf9296b8c075d109426ecd1686211088e618103e
nir/sink: Don't sink load_ubo to outside of its defining loop

Previously, this could have made the resource divergent in code like
that which is genereated by nir_lower_non_uniform_access.

Fixes: da8ed68a ('nir: replace nir_move_load_const() with nir_opt_sink()')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/compiler/nir/nir_opt_sink.c