nouveau/nir: Don't try to emit OP_FMA pre-nvc0.
authorEmma Anholt <emma@anholt.net>
Sat, 26 Mar 2022 04:06:35 +0000 (21:06 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 14 Apr 2022 12:39:48 +0000 (12:39 +0000)
commitb62087e069c4b5e9738d753c8c03cad2f3085d4f
tree3bbc4557836513a9905655ad501adeb075943bc3
parent36f12c85c84364d7f1ea797512462e7c7e47a260
nouveau/nir: Don't try to emit OP_FMA pre-nvc0.

The TGSI backend avoids TGSI_OPCODE_FMA (and thus OP_FMA) pre-nvc0,
replacing it with TGSI_OPCODE_MAD in that case.

Noticed when looking at native-NIR stats and finding that load
optimization wasn't taking place on the unsupported opcode.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15543>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp