Mesa (mesa_7_6_branch): intel: Fallback to software if drawable size is > MaxRenderbufferSize

Ian Romanick idr at kemper.freedesktop.org
Tue Dec 15 20:38:26 UTC 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: f23d01e726a57cd6b8e31f1049ee5853773df7ea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f23d01e726a57cd6b8e31f1049ee5853773df7ea

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Dec 15 12:14:04 2009 -0800

intel: Fallback to software if drawable size is > MaxRenderbufferSize

This prevents the mystery blank window if, for example, glxgears is
resized larger than 2048 wide on 915.  Since the Intel drivers in Mesa
7.6 lack GTT mapped fallbacks, the performance is a slideshow at
best.  On Mesa 7.7 and later the performance is much better.

---

 src/mesa/drivers/dri/intel/intel_buffers.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index e7357e7..4b8ac36 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -172,10 +172,15 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
       return;
    }
 
-   /*
-    * How many color buffers are we drawing into?
+   /* How many color buffers are we drawing into?
+    *
+    * If there are zero buffers or the buffer is too big, don't configure any
+    * regions for hardware drawing.  We'll fallback to software below.  Not
+    * having regions set makes some of the software fallback paths faster.
     */
-   if (fb->_NumColorDrawBuffers == 0) {
+   if ((fb->Width > ctx->Const.MaxRenderbufferSize)
+       || (fb->Height > ctx->Const.MaxRenderbufferSize)
+       || (fb->_NumColorDrawBuffers == 0)) {
       /* writing to 0  */
       colorRegions[0] = NULL;
       intel->constant_cliprect = GL_TRUE;




More information about the mesa-commit mailing list