Mesa (7.9): st/mesa: replace assertion w/ conditional in framebuffer invalidation

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 6 14:42:33 UTC 2010


Module: Mesa
Branch: 7.9
Commit: 0a060c8fb0594807f59bde5c77b518c0ebc99bec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a060c8fb0594807f59bde5c77b518c0ebc99bec

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Oct  6 08:41:44 2010 -0600

st/mesa: replace assertion w/ conditional in framebuffer invalidation

https://bugs.freedesktop.org/show_bug.cgi?id=30632

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 3d6eec0a87ee5549e817cdabb4b6424960678189)

---

 src/mesa/state_tracker/st_manager.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 66e32b4..cd418a0 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -486,9 +486,18 @@ st_context_notify_invalid_framebuffer(struct st_context_iface *stctxi,
    stfb = st_ws_framebuffer(st->ctx->WinSysDrawBuffer);
    if (!stfb || stfb->iface != stfbi)
       stfb = st_ws_framebuffer(st->ctx->WinSysReadBuffer);
-   assert(stfb && stfb->iface == stfbi);
 
-   p_atomic_set(&stfb->revalidate, TRUE);
+   if (stfb && stfb->iface == stfbi) {
+      p_atomic_set(&stfb->revalidate, TRUE);
+   }
+   else {
+      /* This function is probably getting called when we've detected a
+       * change in a window's size but the currently bound context is
+       * not bound to that window.
+       * If the st_framebuffer_iface structure had a pointer to the
+       * corresponding st_framebuffer we'd be able to handle this.
+       */
+   }
 }
 
 static void




More information about the mesa-commit mailing list