From c76efb96b405e43e3261d1dc9e8812fdb2cfbac8 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 10 Jan 2008 17:44:04 +0100 Subject: Remove mapping fields from struct pipe_surface. It's now the responsibility of surface users to keep track of their mappings. --- src/mesa/state_tracker/st_cb_texture.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_texture.c') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 773fc0012e..19274570a1 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1063,15 +1063,13 @@ fallback_copy_texsubimage(GLcontext *ctx, dest_surf = pipe->get_tex_surface(pipe, pt, face, level, destZ); - (void) pipe_surface_map(dest_surf); - (void) pipe_surface_map(src_surf); - /* buffer for one row */ data = (GLfloat *) malloc(width * 4 * sizeof(GLfloat)); /* do copy row by row */ for (row = 0; row < height; row++) { - pipe->get_tile_rgba(pipe, src_surf, srcX, srcY + row, width, 1, data); + pipe->get_tile_rgba(pipe, src_surf, srcX, srcY + row, width, 1, + data); /* XXX we're ignoring convolution for now */ if (ctx->_ImageTransferState) { @@ -1080,14 +1078,11 @@ fallback_copy_texsubimage(GLcontext *ctx, width, (GLfloat (*)[4])data); } - pipe->put_tile_rgba(pipe, dest_surf, destX, destY, width, 1, data); + pipe->put_tile_rgba(pipe, dest_surf, destX, destY, width, 1, + data); destY += yStep; } - - (void) pipe_surface_unmap(dest_surf); - (void) pipe_surface_unmap(src_surf); - free(data); } -- cgit v1.2.3