[Mesa-dev] [PATCH 11/17] nouveau: Replace swrast_texture_image->Map usage with ->Buffer.

Eric Anholt eric at anholt.net
Mon Apr 22 09:14:52 PDT 2013


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.
---
 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 4176681..0889b5a 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
-- 
1.7.10.4



More information about the mesa-dev mailing list