Mesa (gallium-0.2): intel: Fall back on rendering to a texture attachment with a border.
Alan Hourihane
alanh at kemper.freedesktop.org
Tue Dec 9 16:18:07 UTC 2008
Module: Mesa
Branch: gallium-0.2
Commit: 8b661a5d33604fd3706cb1825236d72ae2949598
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b661a5d33604fd3706cb1825236d72ae2949598
Author: Eric Anholt <eric at anholt.net>
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 */
More information about the mesa-commit
mailing list