Mesa (gallium-texture-transfer): softpipe: Unbreak keeping track of cached surface.

Michel Dänzer daenzer at kemper.freedesktop.org
Thu Feb 12 18:45:32 UTC 2009


Module: Mesa
Branch: gallium-texture-transfer
Commit: 2142bf5e17d699396772b90ee5b2592289334f28
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2142bf5e17d699396772b90ee5b2592289334f28

Author: Michel Dänzer <daenzer at vmware.com>
Date:   Thu Feb 12 19:43:43 2009 +0100

softpipe: Unbreak keeping track of cached surface.

glxgears works.

---

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

diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index c070cf6..8534c77 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -163,10 +163,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
    assert(!tc->texture);
 
    if (tc->transfer) {
-      if (ps->texture == tc->transfer->texture &&
-          ps->face == tc->transfer->face &&
-          ps->level == tc->transfer->level &&
-          ps->zslice == tc->transfer->zslice)
+      if (ps == tc->surface)
          return;
 
       if (tc->transfer_map) {
@@ -177,6 +174,8 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
       screen->tex_transfer_release(screen, &tc->transfer);
    }
 
+   tc->surface = ps;
+
    tc->transfer = screen->get_tex_transfer(screen, ps->texture, ps->face,
                                            ps->level, ps->zslice,
                                            PIPE_TRANSFER_READ_WRITE,




More information about the mesa-commit mailing list