Mesa (master): ac/llvm: fix amdgcn.fract for v2f16
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Sep 6 16:37:51 UTC 2020
Module: Mesa
Branch: master
Commit: dd8561fda9a067206d2b54f98ad8cc3b96584bcf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd8561fda9a067206d2b54f98ad8cc3b96584bcf
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sat Jul 4 16:50:06 2020 -0400
ac/llvm: fix amdgcn.fract for v2f16
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>
---
src/amd/llvm/ac_nir_to_llvm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c
index 337ca6605fc..857c0f472f8 100644
--- a/src/amd/llvm/ac_nir_to_llvm.c
+++ b/src/amd/llvm/ac_nir_to_llvm.c
@@ -860,9 +860,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_ffract:
- src[0] = ac_to_float(&ctx->ac, src[0]);
- result = ac_build_fract(&ctx->ac, src[0],
- instr->dest.dest.ssa.bit_size);
+ result = emit_intrin_1f_param_scalar(&ctx->ac, "llvm.amdgcn.fract",
+ ac_to_float_type(&ctx->ac, def_type), src[0]);
break;
case nir_op_fsin:
result = emit_intrin_1f_param(&ctx->ac, "llvm.sin",
More information about the mesa-commit
mailing list