ac: add 16-bit support to fract

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset 2019-03-21 09:19:06 +01:00
parent 0eb1478ac2
commit 2ac5c5c1b5

View File

@ -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 {