summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2005-01-19 07:57:52 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2005-01-19 07:57:52 +0000
commitc98323bd896d51d1ad91b46e73e6eeebcfe78c4f (patch)
treed5a7f7920163a3ebceb1f9de044f92bdb8ec87db /src/mesa/drivers/glide
parent9ebce91a66a5775fbb0d3bfce162531d1ad2d975 (diff)
make sure we avoid assertion failure wrt VB->ColorPtr[1]->stride
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxvb.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c
index 8b731355b5..34ada61f4e 100644
--- a/src/mesa/drivers/glide/fxvb.c
+++ b/src/mesa/drivers/glide/fxvb.c
@@ -104,17 +104,18 @@ static void interp_extras( GLcontext *ctx,
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- /* If stride is zero, ColorPtr[1] is constant across the VB, so
- * there is no point interpolating between two values as they will
- * be identical.
- */
if (VB->ColorPtr[1]) {
- assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
-
- INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ /* If stride is zero, ColorPtr[1] is constant across the VB, so
+ * there is no point interpolating between two values as they will
+ * be identical. This case is handled in t_dd_tritmp.h
+ */
+ if (VB->ColorPtr[1]->stride) {
+ assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ INTERP_4F( t,
+ GET_COLOR(VB->ColorPtr[1], dst),
+ GET_COLOR(VB->ColorPtr[1], out),
+ GET_COLOR(VB->ColorPtr[1], in) );
+ }
if (VB->SecondaryColorPtr[1]) {
INTERP_3F( t,