st/mesa: fix fallout from xfb changes.
[mesa.git] / src / mesa / state_tracker / st_context.c
index c35055a0a97636c10701974feda778c7b0a09ada..f5a6f8598ca063e1c475c242f33484e1c19cabe4 100644 (file)
@@ -141,9 +141,7 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
 
    /* Invalidate render and compute pipelines. */
    st->dirty.mesa |= new_state;
-   st->dirty.st |= ST_NEW_MESA;
    st->dirty_cp.mesa |= new_state;
-   st->dirty_cp.st |= ST_NEW_MESA;
 
    /* This is the only core Mesa module we depend upon.
     * No longer use swrast, swsetup, tnl.
@@ -186,6 +184,10 @@ st_destroy_context_priv(struct st_context *st)
       u_upload_destroy(st->constbuf_uploader);
    }
 
+   /* free glDrawPixels cache data */
+   free(st->drawpix_cache.image);
+   pipe_resource_reference(&st->drawpix_cache.texture, NULL);
+
    cso_destroy_context(st->cso_context);
    free( st );
 }