The entire VUE map is computed based on the slots_valid bitfield;
calling brw_compute_vue_map on the same bitfield will return the
same result. So we can simply compare those.
struct brw_vue_map is 136 bytes; doing a single 8-byte comparison is
much cheaper and should work just as well.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
}
brw->gs.base.prog_data = &brw->gs.prog_data->base.base;
- if (memcmp(&brw->gs.prog_data->base.vue_map, &brw->vue_map_geom_out,
- sizeof(brw->vue_map_geom_out)) != 0) {
+ if (brw->gs.prog_data->base.vue_map.slots_valid !=
+ brw->vue_map_geom_out.slots_valid) {
brw->vue_map_geom_out = brw->gs.prog_data->base.vue_map;
brw->ctx.NewDriverState |= BRW_NEW_VUE_MAP_GEOM_OUT;
}
}
brw->vs.base.prog_data = &brw->vs.prog_data->base.base;
- if (memcmp(&brw->vs.prog_data->base.vue_map, &brw->vue_map_geom_out,
- sizeof(brw->vue_map_geom_out)) != 0) {
+ if (brw->vs.prog_data->base.vue_map.slots_valid !=
+ brw->vue_map_geom_out.slots_valid) {
brw->vue_map_vs = brw->vs.prog_data->base.vue_map;
brw->ctx.NewDriverState |= BRW_NEW_VUE_MAP_VS;
if (brw->gen < 6) {