diff options
author | Eric Anholt <[email protected]> | 2011-02-14 18:57:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-02-26 12:43:15 -0800 |
commit | dea5e57861ec998cb7ee913a8819752cb9fa946b (patch) | |
tree | a82d9afdebe77e98afbb6bed53a7ce399232f063 /src | |
parent | 74cde6505c233f388e902d1daa0e9f186dd012a9 (diff) |
intel: Use the current context rather than last bound context for a drawable.
If another thread bound a context to the drawable then unbound it, the
driContextPriv would end up NULL.
With the previous two fixes, this fixes glx-multithread-makecurrent-2,
despite the issue not being about the multithreaded makecurrent.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 356d5f72d89..746da462ee2 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -104,7 +104,8 @@ static const __DRItexBufferExtension intelTexBufferExtension = { static void intelDRI2Flush(__DRIdrawable *drawable) { - struct intel_context *intel = drawable->driContextPriv->driverPrivate; + GET_CURRENT_CONTEXT(ctx); + struct intel_context *intel = intel_context(ctx); if (intel->gen < 4) INTEL_FIREVERTICES(intel); |