From 8b661a5d33604fd3706cb1825236d72ae2949598 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 6 Dec 2008 15:47:23 -0800 Subject: [PATCH] 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 file changed, 8 insertions(+), 1 deletion(-) 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 */ -- 2.30.2