aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4.cpp
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-11-27 22:21:45 -0800
committerFrancisco Jerez <[email protected]>2014-02-12 23:39:42 +0100
commitb424da4be07ab8d34986e6f3824c679b623df952 (patch)
tree8656297be429d4bebcaa5dfc12787ac50f0b9180 /src/mesa/drivers/dri/i965/brw_vec4.cpp
parenta3a55067bdf608402aeb98d515c52e2436a8f226 (diff)
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 920508118b4..dd23ed48fe1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -76,7 +76,7 @@ src_reg::src_reg(register_file file, int reg, const glsl_type *type)
if (type && (type->is_scalar() || type->is_vector() || type->is_matrix()))
this->swizzle = swizzle_for_size(type->vector_elements);
else
- this->swizzle = SWIZZLE_XYZW;
+ this->swizzle = BRW_SWIZZLE_XYZW;
}
/** Generic unset register constructor. */