diff options
author | Vasily Khoruzhick <[email protected]> | 2019-09-03 22:55:48 -0700 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2019-09-09 10:25:30 -0700 |
commit | 576341324d056fab8c548acea0689f53591e312d (patch) | |
tree | 5ea9b8dbcf010d76d3fc330adbe3323497314079 | |
parent | 996f1b61745f9e9f6b32a3602911f77ede377ca3 (diff) |
lima: run opt_algebraic between int_to_float and boot_to_float for vs
int_to_float emits ftrunc and ftrunc lowering generates bool ops.
Reviewed-by: Connor Abbott <[email protected]>
Reviewed-by: Erico Nunes <[email protected]>
Reviewed-by: Andreas Baierl <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
-rw-r--r-- | src/gallium/drivers/lima/lima_program.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index f92c64a300d..e3863feb80e 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -129,15 +129,16 @@ lima_program_optimize_vs_nir(struct nir_shader *s) } while (progress); NIR_PASS_V(s, nir_lower_int_to_float); - NIR_PASS_V(s, nir_lower_bool_to_float); - - /* Some ops must be lowered after being converted from int ops, - * so re-run nir_opt_algebraic after int lowering. */ + /* Run opt_algebraic between int_to_float and bool_to_float because + * int_to_float emits ftrunc, and ftrunc lowering generates bool ops + */ do { progress = false; NIR_PASS(progress, s, nir_opt_algebraic); } while (progress); + NIR_PASS_V(s, nir_lower_bool_to_float); + NIR_PASS_V(s, nir_copy_prop); NIR_PASS_V(s, nir_opt_dce); NIR_PASS_V(s, nir_lower_locals_to_regs); |