nouveau/nir: Disable bitfield ops pre-nvc0.
authorEmma Anholt <emma@anholt.net>
Mon, 28 Mar 2022 18:21:26 +0000 (11:21 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 20 Apr 2022 21:58:33 +0000 (21:58 +0000)
commit6040107dc1e8374b7be60c0f9704fe593f00cd9b
treece0784dc3552f7fef3d4b4d59953f1658c6c127d
parentadb6d7fe9add275a73b593a6e5f7445a952c7305
nouveau/nir: Disable bitfield ops pre-nvc0.

There's no hardware instructions for them until then.  These chips don't
expose the extension provinding the GLSL builtins for operations like
bfrev, but NIR can recognize the construct and optimize it to
bitfield_reverse, which pre-nvc0 would then fail to codegen.  Prevents a
regression when moving to nir-to-tgsi.  Other lower_bitfield flags are set
as well for when someone comes along and adds optimizations for them too.

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