i965: Initialize unused VUE map slots to BRW_VARYING_SLOT_PAD.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 10 Sep 2015 03:21:59 +0000 (20:21 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Sep 2015 18:59:56 +0000 (11:59 -0700)
Nothing actually relies on unused slots being initialized to
BRW_VARYING_SLOT_COUNT.  Soon, we're going to have VUE maps with holes
in them, at which point pre-filling with BRW_VARYING_SLOT_PAD make a lot
more sense.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_vue_map.c

index 76875789ba869d0bddb846d3c1c815dc6187bbbc..9d828289afc94d7b5c8cab21cfed8c5d249e566a 100644 (file)
@@ -80,7 +80,7 @@ brw_compute_vue_map(const struct brw_device_info *devinfo,
    vue_map->num_slots = 0;
    for (i = 0; i < BRW_VARYING_SLOT_COUNT; ++i) {
       vue_map->varying_to_slot[i] = -1;
-      vue_map->slot_to_varying[i] = BRW_VARYING_SLOT_COUNT;
+      vue_map->slot_to_varying[i] = BRW_VARYING_SLOT_PAD;
    }
 
    /* VUE header: format depends on chip generation and whether clipping is