From ea05e259c9490657a5062480a06ff1cd1b924043 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 19 Apr 2013 21:32:06 -0700 Subject: [PATCH] nouveau: Replace swrast_texture_image->Map usage with ->Buffer. 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 Reviewed-by: Brian Paul --- src/mesa/drivers/dri/nouveau/nouveau_texture.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 4176681ee94..0889b5a54d1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -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 -- 2.30.2