diff options
author | Jason Ekstrand <[email protected]> | 2019-07-11 16:59:31 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-07-16 16:05:16 +0000 |
commit | 110669c85c3fcfed0a4dff42a36fc3f97c5a559a (patch) | |
tree | 951d194b8b8499ba2985b1be477ceb4cc59700ef /src/mesa/state_tracker | |
parent | 548da20b22d43285fd919a4eaab8ef549b36b91e (diff) |
st,i965: Stop looping on 64-bit lowering
Now that the 64-bit lowering passes do a complete lowering in one go, we
don't need to loop anymore. We do, however, have to ensure that int64
lowering happens after double lowering because double lowering can
produce int64 ops.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index be1fc3b2484..9bd69383373 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -367,23 +367,14 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog, if (lower_64bit) { bool lowered_64bit_ops = false; - bool progress = false; - - NIR_PASS_V(nir, nir_opt_algebraic); - - do { - progress = false; - if (options->lower_int64_options) { - NIR_PASS(progress, nir, nir_lower_int64, - options->lower_int64_options); - } - if (options->lower_doubles_options) { - NIR_PASS(progress, nir, nir_lower_doubles, - st->ctx->SoftFP64, options->lower_doubles_options); - } - NIR_PASS(progress, nir, nir_opt_algebraic); - lowered_64bit_ops |= progress; - } while (progress); + if (options->lower_doubles_options) { + NIR_PASS(lowered_64bit_ops, nir, nir_lower_doubles, + st->ctx->SoftFP64, options->lower_doubles_options); + } + if (options->lower_int64_options) { + NIR_PASS(lowered_64bit_ops, nir, nir_lower_int64, + options->lower_int64_options); + } if (lowered_64bit_ops) st_nir_opts(nir, is_scalar); |