i965: Define some useful swizzle helper functions.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 18 Mar 2015 12:34:51 +0000 (14:34 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 23 Mar 2015 12:09:29 +0000 (14:09 +0200)
commitcff670b009ee8c8a60d1551148bf02038824507b
treeaefa50f04d01c082d64fb91f79dbc7b19d2e3cac
parent3cf99701ba6c9e56c9126fdbb74107a31ffcbcfb
i965: Define some useful swizzle helper functions.

This defines helper functions implementing some common swizzle
transformations that are usually open-coded in the compiler back-end,
causing a lot of clutter.  Some optimization passes will become almost
trivial implemented in terms of these functions (e.g.
vec4_visitor::opt_reduce_swizzle()).

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_reg.h