summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri/dri_drawable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 97277c0507..4d7596a831 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -284,7 +284,20 @@ dri_update_buffer(struct pipe_screen *screen, void *context_private)
{
struct dri_context *ctx = (struct dri_context *)context_private;
+ if (ctx->d_stamp == *ctx->dPriv->pStamp &&
+ ctx->r_stamp == *ctx->rPriv->pStamp)
+ return;
+
+ ctx->d_stamp = *ctx->dPriv->pStamp;
+ ctx->r_stamp = *ctx->rPriv->pStamp;
+
+ st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+
+ /* Ask the X server for new renderbuffers. */
dri_get_buffers(ctx->dPriv);
+ if (ctx->dPriv != ctx->rPriv)
+ dri_get_buffers(ctx->rPriv);
+
}
void