diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 3a5b7367250..3472aa3968f 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -2602,7 +2602,8 @@ void visit_alu_instr(isel_context *ctx, nir_alu_instr *instr) Temp tmp = bld.tmp(v1); emit_vop1_instruction(ctx, instr, aco_opcode::v_cvt_f32_f16, tmp); tmp = bld.vop1(aco_opcode::v_cvt_i32_f32, bld.def(v1), tmp); - tmp = convert_int(ctx, bld, tmp, 32, 16, false, (dst.type() == RegType::sgpr) ? Temp() : dst); + tmp = convert_int(ctx, bld, tmp, 32, instr->dest.dest.ssa.bit_size, false, + (dst.type() == RegType::sgpr) ? Temp() : dst); if (dst.type() == RegType::sgpr) { bld.pseudo(aco_opcode::p_as_uniform, Definition(dst), tmp); } @@ -2624,7 +2625,8 @@ void visit_alu_instr(isel_context *ctx, nir_alu_instr *instr) Temp tmp = bld.tmp(v1); emit_vop1_instruction(ctx, instr, aco_opcode::v_cvt_f32_f16, tmp); tmp = bld.vop1(aco_opcode::v_cvt_u32_f32, bld.def(v1), tmp); - tmp = convert_int(ctx, bld, tmp, 32, 16, false, (dst.type() == RegType::sgpr) ? Temp() : dst); + tmp = convert_int(ctx, bld, tmp, 32, instr->dest.dest.ssa.bit_size, false, + (dst.type() == RegType::sgpr) ? Temp() : dst); if (dst.type() == RegType::sgpr) { bld.pseudo(aco_opcode::p_as_uniform, Definition(dst), tmp); }