mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 19:20:08 +01:00
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>
This commit is contained in:
parent
d0e15b8c22
commit
d8f12fd421
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue