diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp | 2 | ||||
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 3 | ||||
-rw-r--r-- | src/mesa/main/state.c | 13 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 935a21624af..8f2b4e9de48 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -181,6 +181,8 @@ static GLbitfield filter_fp_input_mask( GLbitfield fp_inputs, /* _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: diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index dfb494bd8c1..04126fe9b90 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -1650,6 +1650,9 @@ _mesa_get_fixed_func_vertex_program(struct gl_context *ctx) 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); diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 3ca6f58c6a6..9d8964952cd 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -423,8 +423,11 @@ _mesa_update_state( struct gl_context *ctx ) 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) { @@ -471,6 +474,12 @@ set_vertex_processing_mode(struct gl_context *ctx, gl_vertex_processing_mode m) /* 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); } |