gallivm: eliminate a unnecessary AND with unorm lerps
authorRoland Scheidegger <sroland@vmware.com>
Thu, 12 May 2016 23:44:39 +0000 (01:44 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 27 May 2016 17:11:28 +0000 (19:11 +0200)
commit9247570d42600fd01a8afbf6ae0bf6c7008e717a
tree9b8e9bc20a3bf8a4af9e29e7ec39c315091bbd8e
parent17d685c4267887661181209e47031bff9c85606b
gallivm: eliminate a unnecessary AND with unorm lerps

Instead of doing a add and then mask out the upper bits, we can
simply do a add with a half wide type (this, of course, assumes
the hw can actually do it...), so we'll get the required zero
in the upper bits automatically.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c