nvfx: fix bind flags
authorLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 09:45:50 +0000 (11:45 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 09:49:09 +0000 (11:49 +0200)
src/gallium/drivers/nvfx/nvfx_miptree.c
src/gallium/drivers/nvfx/nvfx_transfer.c

index 385551c8241f0de92675d21abbf4f9a513490863..602a4768d4ee0d3bfb46664d87e93de278ef169c 100644 (file)
@@ -302,7 +302,7 @@ nvfx_miptree_surface_del(struct pipe_surface *ps)
        if(ns->backing)
        {
                struct nvfx_screen* screen = (struct nvfx_screen*)ps->texture->screen;
-               if(ns->backing->base.usage & PIPE_BIND_RENDER_TARGET)
+               if(ns->backing->base.usage & PIPE_BIND_BLIT_DESTINATION)
                        screen->eng2d->copy(screen->eng2d, &ns->backing->base, 0, 0, ps, 0, 0, ns->base.width, ns->base.height);
                nvfx_miptree_surface_del(&ns->backing->base);
        }
index 320f9a80f09d8791ad87e2013786cb91ca81fdea..a776ab58311d877298ed1815df00aa5d858b9f19 100644 (file)
@@ -41,10 +41,10 @@ static unsigned nvfx_transfer_bind_flags( unsigned transfer_usage )
        unsigned bind = 0;
 
        if (transfer_usage & PIPE_TRANSFER_WRITE)
-               bind |= PIPE_BIND_BLIT_DESTINATION;
+               bind |= PIPE_BIND_BLIT_SOURCE;
 
        if (transfer_usage & PIPE_TRANSFER_READ)
-               bind |= PIPE_BIND_BLIT_SOURCE;
+               bind |= PIPE_BIND_BLIT_DESTINATION;
 
        return bind;
 }