i965/vec4: Fix confusion between SWIZZLE and BRW_SWIZZLE macros.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 28 Nov 2013 06:21:45 +0000 (22:21 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Feb 2014 22:39:42 +0000 (23:39 +0100)
commitb424da4be07ab8d34986e6f3824c679b623df952
tree8656297be429d4bebcaa5dfc12787ac50f0b9180
parenta3a55067bdf608402aeb98d515c52e2436a8f226
i965/vec4: Fix confusion between SWIZZLE and BRW_SWIZZLE macros.

Most of the VEC4 back-end agrees on src_reg::swizzle being one of the
BRW_SWIZZLE macros defined in brw_reg.h, except in two places where we
use Mesa's SWIZZLE macros.  There is even a doxygen comment saying
that Mesa's macros are the right ones.  They are incompatible swizzle
representations (3 bits vs. 2 bits per component), and the code using
Mesa's works by pure luck.  Fix it.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp