unsigned vs_index;
uint i;
- llvmpipe->color_slot[0] = ~0;
- llvmpipe->color_slot[1] = ~0;
- llvmpipe->bcolor_slot[0] = ~0;
- llvmpipe->bcolor_slot[1] = ~0;
+ llvmpipe->color_slot[0] = -1;
+ llvmpipe->color_slot[1] = -1;
+ llvmpipe->bcolor_slot[0] = -1;
+ llvmpipe->bcolor_slot[1] = -1;
/*
* Match FS inputs against VS outputs, emitting the necessary
if (lpfs->info.base.input_semantic_name[i] == TGSI_SEMANTIC_COLOR &&
lpfs->info.base.input_semantic_index[i] < 2) {
int idx = lpfs->info.base.input_semantic_index[i];
- llvmpipe->color_slot[idx] = vinfo->num_attribs;
+ llvmpipe->color_slot[idx] = (int)vinfo->num_attribs;
}
/*
TGSI_SEMANTIC_BCOLOR, i);
if (vs_index > 0) {
- llvmpipe->bcolor_slot[i] = vinfo->num_attribs;
+ llvmpipe->bcolor_slot[i] = (int)vinfo->num_attribs;
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, vs_index);
}
}
}
if (key->twoside) {
- if (vert_attr == key->color_slot && key->bcolor_slot != ~0)
+ if (vert_attr == key->color_slot && key->bcolor_slot >= 0)
lp_twoside(gallivm, args, key, key->bcolor_slot);
- else if (vert_attr == key->spec_slot && key->bspec_slot != ~0)
+ else if (vert_attr == key->spec_slot && key->bspec_slot >= 0)
lp_twoside(gallivm, args, key, key->bspec_slot);
}
}
key->twoside = lp->rasterizer->light_twoside;
key->size = Offset(struct lp_setup_variant_key,
inputs[key->num_inputs]);
- key->color_slot = lp->color_slot[0];
+
+ key->color_slot = lp->color_slot [0];
key->bcolor_slot = lp->bcolor_slot[0];
- key->spec_slot = lp->color_slot[1];
- key->bspec_slot = lp->bcolor_slot[1];
+ key->spec_slot = lp->color_slot [1];
+ key->bspec_slot = lp->bcolor_slot[1];
+ assert(key->color_slot == lp->color_slot [0]);
+ assert(key->bcolor_slot == lp->bcolor_slot[0]);
+ assert(key->spec_slot == lp->color_slot [1]);
+ assert(key->bspec_slot == lp->bcolor_slot[1]);
+
key->units = (float) (lp->rasterizer->offset_units * lp->mrd);
key->scale = lp->rasterizer->offset_scale;
key->pad = 0;