From 2ac5c5c1b54b45e1926e3c3c6737fbecd0fddfc5 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 21 Mar 2019 09:19:06 +0100 Subject: [PATCH] ac: add 16-bit support to fract Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_llvm_build.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index a153b008594..8701d2ca43a 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -2436,7 +2436,10 @@ LLVMValueRef ac_build_fract(struct ac_llvm_context *ctx, LLVMValueRef src0, LLVMTypeRef type; char *intr; - if (bitsize == 32) { + if (bitsize == 16) { + intr = "llvm.amdgcn.fract.f16"; + type = ctx->f16; + } else if (bitsize == 32) { intr = "llvm.amdgcn.fract.f32"; type = ctx->f32; } else { -- 2.30.2