intel/fs: Implement 16-bit [ui]mul_high
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15829>
This commit is contained in:

committed by
Marge Bot

parent
d0ace28790
commit
a482877c70
@@ -1359,7 +1359,13 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr,
|
|||||||
case nir_op_imul_high:
|
case nir_op_imul_high:
|
||||||
case nir_op_umul_high:
|
case nir_op_umul_high:
|
||||||
assert(nir_dest_bit_size(instr->dest.dest) < 64);
|
assert(nir_dest_bit_size(instr->dest.dest) < 64);
|
||||||
bld.emit(SHADER_OPCODE_MULH, result, op[0], op[1]);
|
if (nir_dest_bit_size(instr->dest.dest) == 32) {
|
||||||
|
bld.emit(SHADER_OPCODE_MULH, result, op[0], op[1]);
|
||||||
|
} else {
|
||||||
|
fs_reg tmp = bld.vgrf(brw_reg_type_from_bit_size(32, op[0].type));
|
||||||
|
bld.MUL(tmp, op[0], op[1]);
|
||||||
|
bld.MOV(result, subscript(tmp, result.type, 1));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nir_op_idiv:
|
case nir_op_idiv:
|
||||||
|
Reference in New Issue
Block a user