From: Brian Paul Date: Sat, 29 Oct 2005 18:29:54 +0000 (+0000) Subject: added some assertions to catch unexpected swizzle values in cvp_emit_arg(), currently... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d04101d18270eec1692e691b1a4321a0ee3fb10;p=mesa.git added some assertions to catch unexpected swizzle values in cvp_emit_arg(), currently fails sometimes --- diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 14011f43db0..3212e00195a 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -790,6 +790,13 @@ static struct reg cvp_emit_arg( struct compilation *cp, */ rsw.dword = 0; rsw.rsw.neg = src->Negate ? WRITEMASK_XYZW : 0; + + /* we're expecting 2-bit swizzles below... */ + ASSERT(GET_SWZ(src->Swizzle, 0) < 4); + ASSERT(GET_SWZ(src->Swizzle, 1) < 4); + ASSERT(GET_SWZ(src->Swizzle, 2) < 4); + ASSERT(GET_SWZ(src->Swizzle, 3) < 4); + rsw.rsw.swz = ((GET_SWZ(src->Swizzle, 0) << 0) | (GET_SWZ(src->Swizzle, 1) << 2) | (GET_SWZ(src->Swizzle, 2) << 4) |