summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_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/mesa/state_tracker/st_context.c
parent155fbcb0ed85c6452cbedd2317f201100fe698ab (diff)
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/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 0358a70726..09f891d691 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -272,7 +272,8 @@ void st_destroy_context( struct st_context *st )
GLboolean
st_make_current(struct st_context *st,
struct st_framebuffer *draw,
- struct st_framebuffer *read)
+ struct st_framebuffer *read,
+ void *winsys_drawable_handle )
{
/* Call this periodically to detect when the user has begun using
* GL rendering from multiple threads.
@@ -280,10 +281,13 @@ st_make_current(struct st_context *st,
_glapi_check_multithread();
if (st) {
- if (!_mesa_make_current(st->ctx, &draw->Base, &read->Base))
+ if (!_mesa_make_current(st->ctx, &draw->Base, &read->Base)) {
+ st->pipe->priv = NULL;
return GL_FALSE;
+ }
_mesa_check_init_viewport(st->ctx, draw->InitWidth, draw->InitHeight);
+ st->pipe->priv = winsys_drawable_handle;
return GL_TRUE;
}