summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-12-06 15:47:23 -0800
committerEric Anholt <eric@anholt.net>2008-12-06 22:41:52 -0800
commit8b661a5d33604fd3706cb1825236d72ae2949598 (patch)
tree4495a5ddfa303e2725a01cf0f70c76e60b518967 /src/mesa/drivers
parent75b26e18a64b2fb1962e5e49dfaebd257c734ecc (diff)
intel: Fall back on rendering to a texture attachment with a border.
Fixes a segfault in oglconform fbo.c test.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c9
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 fce5e36b9d..7453b96dc5 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 */