diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2021-04-07 18:14:36 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-12 16:19:46 +0000 |
commit | d8f12fd421f970bec962057ed53301cb913a79a1 (patch) | |
tree | 62193fba955882e78792bb25971debf29dd2b7fc | |
parent | d0e15b8c22d23878755d40aa4665e4fa4d5b019b (diff) |
aco: fix 16-bit f2{u8,i8} on GFX6/7
Not really tested.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081>
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |