|
|
|
@@ -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); |