Module: Mesa
Branch: master
Commit: 8b661a5d33604fd3706cb1825236d72ae2949598
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b661a5d33604fd3706cb1825236d72ae2949598

Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Sat Dec  6 15:47:23 2008 -0800

intel: Fall back on rendering to a texture attachment with a border.

Fixes a segfault in oglconform fbo.c test.

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c 
b/src/mesa/drivers/dri/intel/intel_fbo.c
index fce5e36..7453b96 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -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 */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to