nir/lower_idiv: add options to use fp32 for 8-bit division lowering

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081>
This commit is contained in:
Rhys Perry
2021-04-07 19:17:46 +01:00
committed by Marge Bot
parent 7db8d307bc
commit a2619b97f5
11 changed files with 74 additions and 32 deletions

View File

@@ -863,9 +863,11 @@ int r600_shader_from_nir(struct r600_context *rctx,
NIR_PASS_V(sel->nir, nir_lower_vars_to_ssa);
NIR_PASS_V(sel->nir, nir_lower_regs_to_ssa);
NIR_PASS_V(sel->nir, nir_lower_idiv,
sel->nir->info.stage == MESA_SHADER_COMPUTE ?
nir_lower_idiv_precise : nir_lower_idiv_fast);
nir_lower_idiv_options idiv_options = {
.imprecise_32bit_lowering = sel->nir->info.stage != MESA_SHADER_COMPUTE,
.allow_fp16 = true,
};
NIR_PASS_V(sel->nir, nir_lower_idiv, &idiv_options);
NIR_PASS_V(sel->nir, r600_lower_alu);
NIR_PASS_V(sel->nir, nir_lower_phis_to_scalar);