intel: Fall back on rendering to a texture attachment with a border.
authorEric Anholt <eric@anholt.net>
Sat, 6 Dec 2008 23:47:23 +0000 (15:47 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 7 Dec 2008 06:41:52 +0000 (22:41 -0800)
Fixes a segfault in oglconform fbo.c test.

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

index fce5e36b9d17c71f8dbef7a471c1d006456a4ff2..7453b96dc5df9b90627f73179de615fe4606e03b 100644 (file)
@@ -620,7 +620,14 @@ intel_render_texture(GLcontext * ctx,
 
    ASSERT(newImage);
 
-   if (!irb) {
+   if (newImage->Border != 0) {
+      /* Fallback on drawing to a texture with a border, which won't have a
+       * miptree.
+       */
+       _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
+       _mesa_render_texture(ctx, fb, att);
+       return;
+   } else if (!irb) {
       irb = intel_wrap_texture(ctx, newImage);
       if (irb) {
          /* bind the wrapper to the attachment point */