diff options
author | Jakob Bornecrantz <[email protected]> | 2010-12-01 05:04:25 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-02-20 16:31:48 +0100 |
commit | 94ccc31ba4f64ac480137fd90f1ded44d2072f6e (patch) | |
tree | 45bdac7b10a933233353c472f5ab69e35cca85d9 /src/gallium/state_trackers/dri/common/dri_drawable.c | |
parent | 9e872a5865c66ed0a518dd1c6c54e72f3afa71f1 (diff) |
st/dri: Track drawable context bindings
Needs to track this ourself since because we get into a race condition with
the dri_util.c code on make current when rendering to the front buffer.
This is what happens:
Old context is rendering to the front buffer.
App calls MakeCurrent with a new context. dri_util.c sets
drawable->driContextPriv to the new context and then calls the driver make
current. st/dri make current flushes the old context, which calls back into
st/dri via the flush frontbuffer hook. st/dri calls dri loader flush
frontbuffer, which calls invalidate buffer on the drawable into st/dri.
This is where things gets wrong. st/dri grabs the context from the dri
drawable (which now points to the new context) and calls invalidate
framebuffer to the new context which has not yet set the new drawable as its
framebuffers since we have not called make current yet, it asserts.
Diffstat (limited to 'src/gallium/state_trackers/dri/common/dri_drawable.c')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c index 060748622c9..28a33ac7d07 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -132,6 +132,7 @@ dri_create_buffer(__DRIscreen * sPriv, drawable->base.validate = dri_st_framebuffer_validate; drawable->base.st_manager_private = (void *) drawable; + drawable->screen = screen; drawable->sPriv = sPriv; drawable->dPriv = dPriv; dPriv->driverPrivate = (void *)drawable; |