wgl: Force framebuffer validation on glViewport.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 8 Mar 2011 20:08:35 +0000 (20:08 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Mar 2011 09:58:35 +0000 (09:58 +0000)
src/gallium/state_trackers/wgl/stw_device.c

index 445db9cd9b844bd8e237d84f3468ba6cd8be20cd..e65e71dc15fb58ac4ff25da7f387df5099e0709f 100644 (file)
@@ -48,7 +48,19 @@ static int
 stw_get_param(struct st_manager *smapi,
               enum st_manager_param param)
 {
-   return 0;
+   switch (param) {
+   case ST_MANAGER_BROKEN_INVALIDATE:
+      /*
+       * Force framebuffer validation on glViewport.
+       *
+       * Certain applications, like Rhinoceros 4, uses glReadPixels
+       * exclusively (never uses SwapBuffers), so framebuffers never get
+       * resized unless we check on glViewport.
+       */
+      return 1;
+   default:
+      return 0;
+   }
 }
 
 boolean