nir: define behavior of nir_op_bfm and nir_op_u/ibfe according to SM5 spec.
authorDaniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Sat, 26 Jan 2019 08:12:46 +0000 (09:12 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Mon, 24 Jun 2019 16:42:20 +0000 (18:42 +0200)
commit165b7f3a4487e7ab7738dd9b37f2b3375692f8a2
tree9a077679a17a8e48b43f7cb67b22ec7e737948b4
parenta74f256c58a2c1fca3ce75e5199a04a22768450e
nir: define behavior of nir_op_bfm and nir_op_u/ibfe according to SM5 spec.

That is: the five least significant bits provide the values of
'bits' and 'offset' which is the case for all hardware currently
supported by NIR and using the bfm/bfe instructions.
This patch also changes the lowering of bitfield_insert/extract
using shifts to not use bfm and removes the flag 'lower_bfm'.

Tested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/broadcom/compiler/nir_to_vir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py
src/freedreno/ir3/ir3_nir.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c