mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
intel/compiler: implement 16-bit pack/unpack opcodes
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
1dacb56279
commit
dd41630d9a
1 changed files with 10 additions and 0 deletions
|
|
@ -1314,6 +1314,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
|
|||
break;
|
||||
|
||||
case nir_op_pack_64_2x32_split:
|
||||
case nir_op_pack_32_2x16_split:
|
||||
bld.emit(FS_OPCODE_PACK, result, op[0], op[1]);
|
||||
break;
|
||||
|
||||
|
|
@ -1326,6 +1327,15 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
|
|||
break;
|
||||
}
|
||||
|
||||
case nir_op_unpack_32_2x16_split_x:
|
||||
case nir_op_unpack_32_2x16_split_y: {
|
||||
if (instr->op == nir_op_unpack_32_2x16_split_x)
|
||||
bld.MOV(result, subscript(op[0], BRW_REGISTER_TYPE_UW, 0));
|
||||
else
|
||||
bld.MOV(result, subscript(op[0], BRW_REGISTER_TYPE_UW, 1));
|
||||
break;
|
||||
}
|
||||
|
||||
case nir_op_fpow:
|
||||
inst = bld.emit(SHADER_OPCODE_POW, result, op[0], op[1]);
|
||||
inst->saturate = instr->dest.saturate;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue