static void
set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs)
{
- if (ctx->API != API_OPENGL_COMPAT &&
- ctx->API != API_OPENGLES)
+ /*
+ * The gl_context::varying_vp_inputs value is only used when in
+ * VP_MODE_FF mode.
+ */
+ if (VP_MODE_FF != ctx->VertexProgram._VPMode)
return;
if (ctx->varying_vp_inputs != varying_inputs) {
/* Finally memorize the value */
ctx->VertexProgram._VPMode = m;
+
+ /* Since we only track the varying inputs while being in fixed function
+ * vertex processing mode, we may need to recheck for the
+ * _NEW_VARYING_VP_INPUTS bit.
+ */
+ set_varying_vp_inputs(ctx, ctx->Array._DrawVAOEnabledAttribs);
}