Module: Mesa Branch: master Commit: 7f75cf2a9408b9af562e033ef6c1d1fd15141421 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7f75cf2a9408b9af562e033ef6c1d1fd15141421
Author: Jason Ekstrand <jason.ekstr...@intel.com> Date: Sat Oct 28 09:05:01 2017 -0700 nir/lower_indirect: Bail early if modes == 0 There's no point in walking the program if we're never going to actually lower anything. Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> --- src/compiler/nir/nir_lower_indirect_derefs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/compiler/nir/nir_lower_indirect_derefs.c index d85c170422..c1f3cf8682 100644 --- a/src/compiler/nir/nir_lower_indirect_derefs.c +++ b/src/compiler/nir/nir_lower_indirect_derefs.c @@ -205,6 +205,9 @@ nir_lower_indirect_derefs(nir_shader *shader, nir_variable_mode modes) { bool progress = false; + if (modes == 0) + return false; + nir_foreach_function(function, shader) { if (function->impl) progress = lower_indirects_impl(function->impl, modes) || progress; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit