summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-12-12 18:10:20 +0100
committerSamuel Pitoiset <[email protected]>2017-12-14 22:24:38 +0100
commitd43e72fd8cb7cde6fa4aa4331539faa34100e68d (patch)
treeb0e800afe3cc4251de2c8e683059f39a8a08b76b /src/gallium/drivers/radeonsi
parent88522e2bcd0e65ca619204f0eec96864323b94cb (diff)
radeonsi: make use of ac_build_fdiv()
And move the comment to amd/common. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
index a27586b3fff..cec33c38b4e 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
@@ -668,13 +668,7 @@ static void emit_fdiv(const struct lp_build_tgsi_action *action,
struct si_shader_context *ctx = si_shader_context(bld_base);
emit_data->output[emit_data->chan] =
- LLVMBuildFDiv(ctx->ac.builder,
- emit_data->args[0], emit_data->args[1], "");
-
- /* Use v_rcp_f32 instead of precise division. */
- if (!LLVMIsConstant(emit_data->output[emit_data->chan]))
- LLVMSetMetadata(emit_data->output[emit_data->chan],
- ctx->fpmath_md_kind, ctx->fpmath_md_2p5_ulp);
+ ac_build_fdiv(&ctx->ac, emit_data->args[0], emit_data->args[1]);
}
/* 1/sqrt is translated to rsq for f32 if fp32 denormals are not enabled in