nouveau: Replace swrast_texture_image->Map usage with ->Buffer.
authorEric Anholt <eric@anholt.net>
Sat, 20 Apr 2013 04:32:06 +0000 (21:32 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 30 Apr 2013 17:40:44 +0000 (10:40 -0700)
This code is trying to deal with providing a map in the case that
AllocTexImageBuffer was called, which is hooked up to the swrast variant.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/nouveau/nouveau_texture.c

index 4176681ee9490b77c1d92cdb868561e6df95bf7b..0889b5a54d1cf8e3654915d69ffb859d706c8e32 100644 (file)
@@ -136,7 +136,7 @@ nouveau_map_texture_image(struct gl_context *ctx,
                        *stride = s->pitch;
                }
        } else {
-               *map = nti->base.Map +
+               *map = nti->base.Buffer +
                        get_format_blocksy(s->format, y) * s->pitch +
                        get_format_blocksx(s->format, x) * s->cpp;
                *stride = s->pitch;
@@ -158,8 +158,6 @@ nouveau_unmap_texture_image(struct gl_context *ctx, struct gl_texture_image *ti,
                nouveau_surface_ref(NULL, st);
 
        }
-
-       nti->base.Map = NULL;
 }
 
 static gl_format