summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_program.c
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-05-31 16:17:06 -0400
committerJonathan Marek <[email protected]>2019-05-31 21:35:26 +0000
commitf387c2b238804b8c2d4df5473055852374c775af (patch)
treeda666e91f300db6bf3dc25335e257e6c8c1b7feb /src/gallium/drivers/lima/lima_program.c
parentf6579ee2043094dc36a0627e4e66c82e78aaf73b (diff)
nir: remove bool lowering from lower_int_to_float
Removes the bool_to_float logic from the int_to_float pass, so that both can be used separately. By having separate passes we have better validation and it makes it possible to use with the lower_ftrunc option (int lowering generates ftrunc, but lower_ftrunc generates bools, ftrunc lowering should probably be reworked). For now we always expect lower_bool to come after lower_int. Also fixes f2i32 to become ftrunc and adds u2f/f2u cases. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/lima_program.c')
-rw-r--r--src/gallium/drivers/lima/lima_program.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c
index e01c487cfd3..38776154edb 100644
--- a/src/gallium/drivers/lima/lima_program.c
+++ b/src/gallium/drivers/lima/lima_program.c
@@ -117,6 +117,7 @@ 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);
NIR_PASS_V(s, nir_copy_prop);
NIR_PASS_V(s, nir_lower_locals_to_regs);
NIR_PASS_V(s, nir_convert_from_ssa, true);
@@ -155,6 +156,7 @@ lima_program_optimize_fs_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);
/* Lower modifiers */
NIR_PASS_V(s, nir_lower_to_source_mods, nir_lower_all_source_mods);