mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
aco: select float8 to fp32 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
This commit is contained in:
parent
19ca4be6b0
commit
001cd632ee
3 changed files with 28 additions and 0 deletions
|
|
@ -717,6 +717,8 @@ get_gfx11_true16_mask(aco_opcode op)
|
|||
case aco_opcode::v_and_b16:
|
||||
case aco_opcode::v_or_b16:
|
||||
case aco_opcode::v_xor_b16: return 0x3 | 0x8;
|
||||
case aco_opcode::v_cvt_pk_f32_fp8:
|
||||
case aco_opcode::v_cvt_pk_f32_bf8:
|
||||
case aco_opcode::v_cvt_f32_f16:
|
||||
case aco_opcode::v_cvt_i32_i16:
|
||||
case aco_opcode::v_cvt_u32_u16: return 0x1;
|
||||
|
|
|
|||
|
|
@ -420,6 +420,8 @@ init_context(isel_context* ctx, nir_shader* shader)
|
|||
case nir_op_f2e4m3fn_satfn:
|
||||
case nir_op_f2e5m2:
|
||||
case nir_op_f2e5m2_sat:
|
||||
case nir_op_e4m3fn2f:
|
||||
case nir_op_e5m22f:
|
||||
case nir_op_fmulz:
|
||||
case nir_op_ffmaz:
|
||||
case nir_op_f2f64:
|
||||
|
|
|
|||
|
|
@ -2596,6 +2596,30 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
emit_split_vector(ctx, dst, 2);
|
||||
break;
|
||||
}
|
||||
case nir_op_e4m3fn2f: {
|
||||
if (instr->def.num_components == 2) {
|
||||
Temp src = get_alu_src(ctx, instr->src[0], 2);
|
||||
bld.vop1(aco_opcode::v_cvt_pk_f32_fp8, Definition(dst), src);
|
||||
emit_split_vector(ctx, dst, 2);
|
||||
} else {
|
||||
Temp src = get_alu_src(ctx, instr->src[0]);
|
||||
assert(instr->def.num_components == 1);
|
||||
bld.vop1(aco_opcode::v_cvt_f32_fp8, Definition(dst), src);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nir_op_e5m22f: {
|
||||
if (instr->def.num_components == 2) {
|
||||
Temp src = get_alu_src(ctx, instr->src[0], 2);
|
||||
bld.vop1(aco_opcode::v_cvt_pk_f32_bf8, Definition(dst), src);
|
||||
emit_split_vector(ctx, dst, 2);
|
||||
} else {
|
||||
Temp src = get_alu_src(ctx, instr->src[0]);
|
||||
assert(instr->def.num_components == 1);
|
||||
bld.vop1(aco_opcode::v_cvt_f32_bf8, Definition(dst), src);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nir_op_i2f16: {
|
||||
Temp src = get_alu_src(ctx, instr->src[0]);
|
||||
const unsigned input_size = instr->src[0].src.ssa->bit_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue