From: Eric Anholt Date: Sat, 6 Dec 2008 23:47:23 +0000 (-0800) Subject: intel: Fall back on rendering to a texture attachment with a border. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b661a5d33604fd3706cb1825236d72ae2949598;p=mesa.git intel: Fall back on rendering to a texture attachment with a border. Fixes a segfault in oglconform fbo.c test. --- diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index fce5e36b9d1..7453b96dc5d 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 */