mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 21:20:12 +01:00
i965/fs: Add support for the MAC instruction.
This allows us to generate the MAC (multiply-accumulate) instruction, which can be used to implement some expressions in fewer instructions than doing a series of MUL and ADDs. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
This commit is contained in:
parent
2dfbbeca50
commit
da0c3b02e7
2 changed files with 4 additions and 0 deletions
|
|
@ -196,6 +196,7 @@ ALU3(MAD)
|
|||
ALU2_ACC(ADDC)
|
||||
ALU2_ACC(SUBB)
|
||||
ALU2(SEL)
|
||||
ALU2(MAC)
|
||||
|
||||
/** Gen4 predicated IF. */
|
||||
fs_inst *
|
||||
|
|
|
|||
|
|
@ -1545,6 +1545,9 @@ fs_generator::generate_code(exec_list *instructions, FILE *dump_file)
|
|||
assert(brw->gen >= 7);
|
||||
brw_SUBB(p, dst, src[0], src[1]);
|
||||
break;
|
||||
case BRW_OPCODE_MAC:
|
||||
brw_MAC(p, dst, src[0], src[1]);
|
||||
break;
|
||||
|
||||
case BRW_OPCODE_BFE:
|
||||
assert(brw->gen >= 7);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue