i965/fs: Add support for bit instructions. 76/6476/1
authorMatt Turner <mattst88@gmail.com>
Wed, 10 Apr 2013 02:22:34 +0000 (19:22 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 6 May 2013 17:17:14 +0000 (10:17 -0700)
commit1f0f26d60c148e360908af34130c4e00dba8f3df
tree02817e6857e0ad7e9ffe18bf3f47a69007366d7e
parentfa958182b7e7a9a177ec45ffd39d42f15ca756b3
i965/fs: Add support for bit instructions.

Don't bother scalarizing ir_binop_bfm, since its results are
identical for all channels.

v2: Subtract result of FBH from 31 (unless an error) to convert
    MSB counts to LSB counts.
v3: Use op0->clone() in ir_triop_bfi to prevent (var_ref
    channel_expressions) from appearing multiple times in the IR.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> [v2]
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp