Module: Mesa
Branch: gallium-0.2
Commit: 515c3d9bc15f66e5ffea87efee52fc27b4b558db
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=515c3d9bc15f66e5ffea87efee52fc27b4b558db

Author: Ben Skeggs <skeg...@gmail.com>
Date:   Mon Jan 12 15:06:15 2009 +1000

nv50: fix a typo and a thinko

---

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

diff --git a/src/gallium/drivers/nv50/nv50_miptree.c 
b/src/gallium/drivers/nv50/nv50_miptree.c
index 415080b..430e75a 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -124,7 +124,7 @@ nv50_miptree_sync(struct pipe_screen *pscreen, struct 
nv50_miptree *mt,
        struct pipe_surface *dst, *src;
        unsigned face = 0, zslice = 0;
 
-       if (!lvl->image_dirty_cpu & (1 << image))
+       if (!(lvl->image_dirty_cpu & (1 << image)))
                return;
 
        if (mt->base.target == PIPE_TEXTURE_CUBE)
@@ -138,14 +138,15 @@ nv50_miptree_sync(struct pipe_screen *pscreen, struct 
nv50_miptree *mt,
         */
        lvl->image_dirty_cpu &= ~(1 << image);
 
-       dst = pscreen->get_tex_surface(pscreen, &mt->base, face, level, zslice,
-                                      PIPE_BUFFER_USAGE_GPU_WRITE);
        /* Pretend we're doing CPU access so we get the backing pipe_surface
         * and not a view into the larger miptree.
         */
        src = pscreen->get_tex_surface(pscreen, &mt->base, face, level, zslice,
                                       PIPE_BUFFER_USAGE_CPU_READ);
 
+       dst = pscreen->get_tex_surface(pscreen, &mt->base, face, level, zslice,
+                                      PIPE_BUFFER_USAGE_GPU_WRITE);
+
        nvws->surface_copy(nvws, dst, 0, 0, src, 0, 0, dst->width, dst->height);
 
        pscreen->tex_surface_release(pscreen, &dst);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to