/* _NEW_VARYING_VP_INPUTS */
GLbitfield varying_inputs = ctx->varying_vp_inputs;
+ /* We only update ctx->varying_vp_inputs when in VP_MODE_FF _VPMode */
+ assert(VP_MODE_FF == ctx->VertexProgram._VPMode);
/* These get generated in the setup routine regardless of the
* vertex program:
struct gl_program *prog;
struct state_key key;
+ /* We only update ctx->varying_vp_inputs when in VP_MODE_FF _VPMode */
+ assert(VP_MODE_FF == ctx->VertexProgram._VPMode);
+
/* Grab all the relevant state and put it in a single structure:
*/
make_state_key(ctx, &key);
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);
}