nir: Add lowering for bitfieldInsert without using bfi.
authorEric Anholt <eric@anholt.net>
Wed, 2 May 2018 21:13:23 +0000 (14:13 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 6 Jun 2018 20:44:28 +0000 (13:44 -0700)
commit74618ccbcab6d785152c2840525d5bef08ed0696
tree6d1507766b450549f5584fb15000a833247e7d45
parent735b104707382b6f14f5d49b456c80f5852240af
nir: Add lowering for bitfieldInsert without using bfi.

If you don't have HW to do bfi, then lowering bitfieldInsert to bfi makes
things harder than keeping the "bits" argument around.

This still uses bfm, but I've added the obvious lowering of bfm if you
need it.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_algebraic.py