mesa: do state validation in _mesa_valid_to_render()
[mesa.git] / src / mesa / main / context.c
index a570506d57b34ef2783f26ca6919439697bbcc34..eb6bc8e4369e234f02cd9b10a7818780bdc2dff7 100644 (file)
@@ -1578,6 +1578,10 @@ _mesa_set_mvp_with_dp4( GLcontext *ctx,
 GLboolean
 _mesa_valid_to_render(GLcontext *ctx, const char *where)
 {
+   /* This depends on having up to date derived state (shaders) */
+   if (ctx->NewState)
+      _mesa_update_state(ctx);
+
    if (ctx->Shader.CurrentProgram) {
       /* using shaders */
       if (!ctx->Shader.CurrentProgram->LinkStatus) {