intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it.
authorEric Anholt <eric@anholt.net>
Wed, 20 May 2009 21:05:03 +0000 (14:05 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 21 May 2009 17:40:11 +0000 (10:40 -0700)
This happens to rendering with textures with a border, which had resulted
in a segfault on dereferencing the irb.

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

index 52647ddf8b2cdd32df6bb794feee6c9877527719..0b0f0f980bf1315e02a83bc06cfb84c5eb1c149c 100644 (file)
@@ -679,6 +679,11 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
       if (rb == NULL)
         continue;
 
+      if (irb == NULL) {
+        fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
+        continue;
+      }
+
       switch (irb->texformat->MesaFormat) {
       case MESA_FORMAT_ARGB8888:
       case MESA_FORMAT_RGB565: