[Mesa-dev] [PATCH 15/17] intel: Ensure renderbuffers are current when mapping them.

Eric Anholt eric at anholt.net
Mon Apr 22 09:14:56 PDT 2013


In the case of renering to windows in X, we would render to stale buffers
(or not render at all!) if you hit a MapRenderbuffer as the first thing
done to your window after new buffers are ready to be collected in DRI2.

I think this also covers the weird comment about irb->mt being missing
sometimes.
---
 src/mesa/drivers/dri/intel/intel_fbo.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index d22de68..21c30f8 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -123,12 +123,7 @@ intel_map_renderbuffer(struct gl_context *ctx,
       return;
    }
 
-   /* We sometimes get called with this by our intel_span.c usage. */
-   if (!irb->mt) {
-      *out_map = NULL;
-      *out_stride = 0;
-      return;
-   }
+   intel_prepare_render(intel);
 
    /* For a window-system renderbuffer, we need to flip the mapping we receive
     * upside-down.  So we need to ask for a rectangle on flipped vertically, and
-- 
1.7.10.4



More information about the mesa-dev mailing list