From b5c10a902821a90fed68adb8aff0f070e6ebdb60 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Wed, 15 Jun 2022 17:51:25 +0800 Subject: [PATCH] ac/llvm: cast tes_u/v_replaced to float MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise LLVM float ops fail to operate on them. Acked-by: Marek Olšák Reviewed-by: Timur Kristóf Signed-off-by: Qiang Yu Part-of: --- src/amd/llvm/ac_nir_to_llvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 6599b9e..3b7d971 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -4228,8 +4228,8 @@ static void visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins ctx->instance_id_replaced = get_src(ctx, instr->src[1]); break; case nir_intrinsic_overwrite_tes_arguments_amd: - ctx->tes_u_replaced = get_src(ctx, instr->src[0]); - ctx->tes_v_replaced = get_src(ctx, instr->src[1]); + ctx->tes_u_replaced = ac_to_float(&ctx->ac, get_src(ctx, instr->src[0])); + ctx->tes_v_replaced = ac_to_float(&ctx->ac, get_src(ctx, instr->src[1])); ctx->tes_rel_patch_id_replaced = get_src(ctx, instr->src[2]); ctx->tes_patch_id_replaced = get_src(ctx, instr->src[3]); break; -- 2.7.4