summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-10 09:22:02 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-10 09:22:02 +0000
commit3e38dbe3d3371f0a37dd35582301ae2b1507e5d2 (patch)
treec9831aab18433e71c60c6cc0c71b03e862b99a4c /src/gallium/state_trackers/dri/dri_context.c
parent155fbcb0ed85c6452cbedd2317f201100fe698ab (diff)
downloadexternal_mesa3d-3e38dbe3d3371f0a37dd35582301ae2b1507e5d2.zip
external_mesa3d-3e38dbe3d3371f0a37dd35582301ae2b1507e5d2.tar.gz
external_mesa3d-3e38dbe3d3371f0a37dd35582301ae2b1507e5d2.tar.bz2
gallium: plumb winsys-drawable-handle through to state tracker
The state trackers need this value so that they can supply it as the "void *" argument to flush_frontbuffer. Fixes single-buffer rendering.
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_context.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_context.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index 908cef4..2f991c3 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -128,7 +128,7 @@ dri_unbind_context(__DRIcontext * cPriv)
if (--ctx->bind_count == 0) {
if (ctx->st && ctx->st == st_get_current()) {
st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
- st_make_current(NULL, NULL, NULL);
+ st_make_current(NULL, NULL, NULL, NULL);
}
}
}
@@ -161,7 +161,13 @@ dri_make_current(__DRIcontext * cPriv,
ctx->r_stamp = driReadPriv->lastStamp - 1;
}
- st_make_current(ctx->st, draw->stfb, read->stfb);
+ /* DRI co-state tracker currently overrides flush_frontbuffer.
+ * When this is fixed, will need to pass the drawable in the
+ * fourth parameter here so that when Mesa calls
+ * flush_frontbuffer directly (in front-buffer rendering), it
+ * will have access to the drawable argument:
+ */
+ st_make_current(ctx->st, draw->stfb, read->stfb, NULL);
if (__dri1_api_hooks) {
dri1_update_drawables(ctx, draw, read);
@@ -170,7 +176,7 @@ dri_make_current(__DRIcontext * cPriv,
ctx->pipe->priv);
}
} else {
- st_make_current(NULL, NULL, NULL);
+ st_make_current(NULL, NULL, NULL, NULL);
}
return GL_TRUE;