OSDN Git Service

intel: Use the current context rather than last bound context for a drawable.
authorEric Anholt <eric@anholt.net>
Tue, 15 Feb 2011 02:57:49 +0000 (18:57 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 26 Feb 2011 20:43:15 +0000 (12:43 -0800)
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.

src/mesa/drivers/dri/intel/intel_screen.c

index 356d5f7..746da46 100644 (file)
@@ -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);