Mesa (master): softpipe: need to set tc->transfer= NULL after destroying the transfer object

Brian Paul brianp at kemper.freedesktop.org
Wed Mar 18 16:24:41 UTC 2009


Module: Mesa
Branch: master
Commit: 71e3aa14fb09616a9b06cd6fd01fcabf3853cacd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71e3aa14fb09616a9b06cd6fd01fcabf3853cacd

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Mar 18 09:55:00 2009 -0600

softpipe: need to set tc->transfer=NULL after destroying the transfer object

This fixes a number of crashes/regressions in programs such as lodbias.c,
mipmap_limits.c, etc.

---

 src/gallium/drivers/softpipe/sp_tile_cache.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 51e34d0..6db7930 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -172,6 +172,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
       }
 
       screen->tex_transfer_destroy(tc->transfer);
+      tc->transfer = NULL;
    }
 
    tc->surface = ps;




More information about the mesa-commit mailing list