From cd6cfd1095b08cc3156ca0bfa62e28fa337c67a9 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 2 Nov 2017 13:22:24 +1100 Subject: [PATCH] ac: use the ac f16 llvm type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/amd/common/ac_nir_to_llvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 736131ab568..1e1a1c0276a 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -134,7 +134,6 @@ struct nir_to_llvm_context { LLVMValueRef persp_sample, persp_center, persp_centroid; LLVMValueRef linear_sample, linear_center, linear_centroid; - LLVMTypeRef f16; LLVMTypeRef v2f32; LLVMTypeRef v4f32; @@ -986,7 +985,6 @@ static void create_function(struct nir_to_llvm_context *ctx, static void setup_types(struct nir_to_llvm_context *ctx) { - ctx->f16 = LLVMHalfTypeInContext(ctx->context); ctx->v2f32 = LLVMVectorType(ctx->ac.f32, 2); ctx->v4f32 = LLVMVectorType(ctx->ac.f32, 4); @@ -1314,7 +1312,7 @@ static LLVMValueRef emit_f2f16(struct nir_to_llvm_context *ctx, LLVMValueRef cond = NULL; src0 = ac_to_float(&ctx->ac, src0); - result = LLVMBuildFPTrunc(ctx->builder, src0, ctx->f16, ""); + result = LLVMBuildFPTrunc(ctx->builder, src0, ctx->ac.f16, ""); if (ctx->options->chip_class >= VI) { LLVMValueRef args[2]; -- 2.30.2