summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-02-01 14:20:31 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2007-02-01 14:20:31 +0000
commit605d428d20819ac3f46aaeb4a66707febec7ded2 (patch)
tree1431a13dc16e8d0d84264918887a5f4777ad441f /src
parent893526b8a823fe1b88f2b46376155afb91c84016 (diff)
Cope with internally-generated null inputs.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c9
1 files 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 7d8f837093..092c6bafc2 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: