summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-01-11 11:41:47 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-01-11 11:44:38 +1000
commit32da02f7c19f49802fe9589e73c3945502a197c9 (patch)
tree9593ef86fec717da12a02792214acc0c9a6ae2aa /src/gallium/state_trackers
parent8a2c961798b4ab1f1095f14d814242422020d4f9 (diff)
st/dri: update dri2 drawables when viewport is changed
Fixes gnome-shell on nouveau, as well as window resize with various other applications. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c8
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.h3
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 1058dd38c2..f131e77ac5 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -268,6 +268,14 @@ void dri2_set_tex_buffer(__DRIcontext *pDRICtx, GLint target,
}
void
+dri_update_buffer(struct pipe_screen *screen, void *context_private)
+{
+ struct dri_context *ctx = (struct dri_context *)context_private;
+
+ dri_get_buffers(ctx->dPriv);
+}
+
+void
dri_flush_frontbuffer(struct pipe_screen *screen,
struct pipe_surface *surf, void *context_private)
{
diff --git a/src/gallium/state_trackers/dri/dri_drawable.h b/src/gallium/state_trackers/dri/dri_drawable.h
index 80bb5d7f61..8bc59cb4c3 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.h
+++ b/src/gallium/state_trackers/dri/dri_drawable.h
@@ -81,6 +81,9 @@ dri_create_buffer(__DRIscreen * sPriv,
const __GLcontextModes * visual, boolean isPixmap);
void
+dri_update_buffer(struct pipe_screen *screen, void *context_private);
+
+void
dri_flush_frontbuffer(struct pipe_screen *screen,
struct pipe_surface *surf, void *context_private);
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index bb12baf281..793db087ee 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -308,6 +308,7 @@ dri_init_screen2(__DRIscreen * sPriv)
}
/* We need to hook in here */
+ screen->pipe_screen->update_buffer = dri_update_buffer;
screen->pipe_screen->flush_frontbuffer = dri_flush_frontbuffer;
driParseOptionInfo(&screen->optionCache,