From 605d428d20819ac3f46aaeb4a66707febec7ded2 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 1 Feb 2007 14:20:31 +0000 Subject: [PATCH] Cope with internally-generated null inputs. --- src/mesa/drivers/dri/i965/brw_draw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 7d8f837093a..092c6bafc2d 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -183,10 +183,13 @@ static void brw_merge_inputs( struct brw_context *brw, for (i = 0; i < VERT_ATTRIB_MAX; i++) { brw->vb.inputs[i].glarray = arrays[i]; - if (arrays[i]->StrideB != 0) - brw->vb.info.varying |= 1 << i; + /* XXX: metaops passes null arrays */ + if (arrays[i]) { + if (arrays[i]->StrideB != 0) + brw->vb.info.varying |= 1 << i; - brw->vb.info.sizes[i/16] |= (inputs[i].glarray->Size - 1) << ((i%16) * 2); + brw->vb.info.sizes[i/16] |= (inputs[i].glarray->Size - 1) << ((i%16) * 2); + } } /* Raise statechanges if input sizes and varying have changed: -- 2.30.2