summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-10-29 18:29:54 +0000
committerBrian Paul <[email protected]>2005-10-29 18:29:54 +0000
commit5d04101d18270eec1692e691b1a4321a0ee3fb10 (patch)
tree1102d39249202744c0c8b847260009fd8387e7e3
parent32df89e12d0e812ee633c082565daed2b04bd3c9 (diff)
added some assertions to catch unexpected swizzle values in cvp_emit_arg(), currently fails sometimes
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c7
1 files changed, 7 insertions, 0 deletions
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) |