And update some comments.
key.passthrough_edgeflags = st->vertdata_edgeflags;
key.clamp_color = st->clamp_vert_color_in_shader &&
- st->ctx->Light._ClampVertexColor;
+ st->ctx->Light._ClampVertexColor &&
+ (stvp->Base.Base.OutputsWritten &
+ (VARYING_SLOT_COL0 |
+ VARYING_SLOT_COL1 |
+ VARYING_SLOT_BFC0 |
+ VARYING_SLOT_BFC1));
st->vp_variant = st_get_vp_variant(st, stvp, &key);
/* Clamp colors for ARB_color_buffer_float. */
switch (t->procType) {
case TGSI_PROCESSOR_VERTEX:
- /* XXX if the geometry shader is present, this must be done there
- * instead of here. */
+ /* This can only occur with a compatibility profile, which doesn't
+ * support geometry shaders. */
if (dst_reg->index == VARYING_SLOT_COL0 ||
dst_reg->index == VARYING_SLOT_COL1 ||
dst_reg->index == VARYING_SLOT_BFC0 ||
/* Clamp colors for ARB_color_buffer_float. */
switch (t->procType) {
case TGSI_PROCESSOR_VERTEX:
- /* XXX if the geometry shader is present, this must be done there
- * instead of here. */
+ /* This can only occur with a compatibility profile, which doesn't
+ * support geometry shaders. */
if (DstReg->Index == VARYING_SLOT_COL0 ||
DstReg->Index == VARYING_SLOT_COL1 ||
DstReg->Index == VARYING_SLOT_BFC0 ||