From: Marek Olšák Date: Thu, 23 Jul 2020 03:03:39 +0000 (-0400) Subject: ac/llvm: fix amdgcn.rsq for v2f16 X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=073dab2c1e11d5de4cbf20b6ce6fdf08ddc5cc5d ac/llvm: fix amdgcn.rsq for v2f16 Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 857c0f472f8..b8ecd2765fb 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -884,8 +884,8 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) ac_to_float_type(&ctx->ac, def_type), src[0]); break; case nir_op_frsq: - result = emit_intrin_1f_param(&ctx->ac, "llvm.amdgcn.rsq", - ac_to_float_type(&ctx->ac, def_type), src[0]); + result = emit_intrin_1f_param_scalar(&ctx->ac, "llvm.amdgcn.rsq", + ac_to_float_type(&ctx->ac, def_type), src[0]); if (ctx->abi->clamp_div_by_zero) result = ac_build_fmin(&ctx->ac, result, LLVMConstReal(ac_to_float_type(&ctx->ac, def_type), FLT_MAX));