From: Keith Whitwell Date: Thu, 1 Feb 2007 14:20:31 +0000 (+0000) Subject: Cope with internally-generated null inputs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=605d428d20819ac3f46aaeb4a66707febec7ded2;p=mesa.git Cope with internally-generated null inputs. --- 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: