diff options
author | Vasily Khoruzhick <[email protected]> | 2019-04-30 22:25:23 -0700 |
---|---|---|
committer | Qiang Yu <[email protected]> | 2019-05-07 01:07:27 +0000 |
commit | cf1ab4b96b15d7c7baf2cbd43e842f0172da5290 (patch) | |
tree | e46e7fd2d9dd7e04b32c8693306f3242b032fc3c | |
parent | 443c5a3cd62d55c7969c873d21bc1af2ee21a600 (diff) |
lima: use int_to_float lowering pass
Neither GP nor PP in Mali4x0 support integers, so utilize new pass
and set native_integers to true for now until this flag is dropped.
Reviewed-by: Qiang Yu <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
-rw-r--r-- | src/gallium/drivers/lima/lima_program.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 98416471e67..21e64fb6aaf 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -49,6 +49,7 @@ static const nir_shader_compiler_options vs_nir_options = { .lower_flrp64 = true, /* could be implemented by clamp */ .lower_fsat = true, + .native_integers = true, }; static const nir_shader_compiler_options fs_nir_options = { @@ -58,6 +59,7 @@ static const nir_shader_compiler_options fs_nir_options = { .lower_flrp32 = true, .lower_flrp64 = true, .lower_fsign = true, + .native_integers = true, }; const void * @@ -90,7 +92,6 @@ lima_program_optimize_vs_nir(struct nir_shader *s) NIR_PASS_V(s, lima_nir_lower_uniform_to_scalar); NIR_PASS_V(s, nir_lower_io_to_scalar, nir_var_shader_in|nir_var_shader_out); - NIR_PASS_V(s, nir_lower_bool_to_float); do { progress = false; @@ -113,6 +114,8 @@ lima_program_optimize_vs_nir(struct nir_shader *s) nir_var_function_temp); } while (progress); + NIR_PASS_V(s, nir_lower_int_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); NIR_PASS_V(s, nir_remove_dead_variables, nir_var_function_temp); @@ -127,7 +130,6 @@ lima_program_optimize_fs_nir(struct nir_shader *s) NIR_PASS_V(s, nir_lower_fragcoord_wtrans); NIR_PASS_V(s, nir_lower_io, nir_var_all, type_size, 0); NIR_PASS_V(s, nir_lower_regs_to_ssa); - NIR_PASS_V(s, nir_lower_bool_to_float); do { progress = false; @@ -150,6 +152,8 @@ lima_program_optimize_fs_nir(struct nir_shader *s) nir_var_function_temp); } while (progress); + NIR_PASS_V(s, nir_lower_int_to_float); + /* Lower modifiers */ NIR_PASS_V(s, nir_lower_to_source_mods, nir_lower_all_source_mods); NIR_PASS_V(s, nir_copy_prop); |