blend, logicop changes for intelEmitCopyBlit backported to i915
[mesa.git] / src / mesa / drivers / dri / i915tex / intel_context.c
index 3d51a6341c7e1153d1ff995c1fc36f34aab109b8..c77d365360d6bd47f5c79800bcb558b2defb89c9 100644 (file)
@@ -86,7 +86,7 @@ int INTEL_DEBUG = (0);
 #include "extension_helper.h"
 
 
-#define DRIVER_DATE                     "20060929"
+#define DRIVER_DATE                     "20061102"
 
 _glthread_Mutex lockMutex;
 static GLboolean lockMutexInit = GL_FALSE;
@@ -577,6 +577,16 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
          }
       }
 
+      /* set initial GLframebuffer size to match window, if needed */
+      if (drawFb->Width == 0 && driDrawPriv->w) {
+         _mesa_resize_framebuffer(&intel->ctx, drawFb,
+                                  driDrawPriv->w, driDrawPriv->h);
+      }         
+      if (readFb->Width == 0 && driReadPriv->w) {
+         _mesa_resize_framebuffer(&intel->ctx, readFb,
+                                  driReadPriv->w, driReadPriv->h);
+      }         
+
       _mesa_make_current(&intel->ctx, drawFb, readFb);
 
       /* The drawbuffer won't always be updated by _mesa_make_current: 
@@ -655,9 +665,6 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
 }
 
 
-extern _glthread_Mutex lockMutex;
-
-
 /* Lock the hardware and validate our state.  
  */
 void LOCK_HARDWARE( struct intel_context *intel )