.lower_tg4_offsets = true,
};
- nir_lower_image_options lower_image_opts = {
- .lower_cube_size = true,
- };
- NIR_PASS_V(s, nir_lower_image, &lower_image_opts);
-
if (compiler->gen >= 4) {
/* a4xx seems to have *no* sam.p */
tex_options.lower_txp = ~0; /* lower all txp */
lower_subgroup_id, NULL);
}
+static const nir_lower_idiv_options idiv_options = {
+ .imprecise_32bit_lowering = true,
+ .allow_fp16 = true,
+};
+
/**
* Late passes that need to be done after pscreen->finalize_nir()
*/
}
/* we cannot ensure that ir3_finalize_nir() is only called once, so
- * we also need to do trig workarounds here:
+ * we also need to do any run-once workarounds here:
*/
OPT_V(s, ir3_nir_apply_trig_workarounds);
+ nir_lower_image_options lower_image_opts = {
+ .lower_cube_size = true,
+ };
+ NIR_PASS_V(s, nir_lower_image, &lower_image_opts);
+ NIR_PASS_V(s, nir_lower_idiv, &idiv_options); /* idiv generated by cube lowering */
+
ir3_optimize_loop(compiler, s);
}