/** A fake frontface output for unfilled primitives */
uint8_t face_slot;
- /** Which output slot is used for the fake vp index info */
- uint8_t fake_vpindex_slot;
-
- /** Which output slot is used for the fake layer info */
- uint8_t fake_layer_slot;
-
/** Depth format and bias settings. */
boolean floating_point_depth;
double mrd; /**< minimum resolvable depth value, for polygon offset */
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_CONSTANT, vs_index);
/*
* For vp index and layer, if the fs requires them but the vs doesn't
- * provide them, store the slot - we'll later replace the data directly
- * with zero (as required by ARB_fragment_layer_viewport). This is
- * because draw itself just redirects them to whatever was at output 0.
- * We'll also store the real vpindex/layer slot for setup use.
+ * provide them, draw (vbuf) will give us the required 0 (slot -1).
+ * (This means in this case we'll also use those slots in setup, which
+ * isn't necessary but they'll contain the correct (0) value.)
*/
} else if (lpfs->info.base.input_semantic_name[i] ==
TGSI_SEMANTIC_VIEWPORT_INDEX) {
- if (vs_index >= 0) {
- llvmpipe->viewport_index_slot = vinfo->num_attribs;
- }
- else {
- llvmpipe->fake_vpindex_slot = vinfo->num_attribs;
- }
+ llvmpipe->viewport_index_slot = vinfo->num_attribs;
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_CONSTANT, vs_index);
} else if (lpfs->info.base.input_semantic_name[i] == TGSI_SEMANTIC_LAYER) {
- if (vs_index >= 0) {
- llvmpipe->layer_slot = vinfo->num_attribs;
- }
- else {
- llvmpipe->fake_layer_slot = vinfo->num_attribs;
- }
+ llvmpipe->layer_slot = vinfo->num_attribs;
draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_CONSTANT, vs_index);
} else {
/*
*/
break;
- case LP_INTERP_ZERO:
- /*
- * The information we get from the output is bogus, replace it
- * with zero.
- */
- emit_constant_coef4(gallivm, args, slot+1, args->bld.zero);
- break;
case LP_INTERP_FACING:
emit_facing_coef(gallivm, args, slot+1);
break;
key->pad = 0;
memcpy(key->inputs, fs->inputs, key->num_inputs * sizeof key->inputs[0]);
for (i = 0; i < key->num_inputs; i++) {
- if (key->inputs[i].interp == LP_INTERP_CONSTANT) {
- if (key->inputs[i].src_index == lp->fake_vpindex_slot ||
- key->inputs[i].src_index == lp->fake_layer_slot) {
- key->inputs[i].interp = LP_INTERP_ZERO;
- }
- }
- else if (key->inputs[i].interp == LP_INTERP_COLOR) {
+ if (key->inputs[i].interp == LP_INTERP_COLOR) {
if (lp->rasterizer->flatshade)
key->inputs[i].interp = LP_INTERP_CONSTANT;
else