summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-07 18:19:49 -0600
committerBrian <[email protected]>2007-08-07 18:24:29 -0600
commit11c557d3cab41e15a5b03715feffc7f920e4b661 (patch)
treed837e643e94cf01cf3762857c46fd5199d9c0b96 /src/mesa/pipe/softpipe/sp_context.c
parent204d35c0efa2e1e96cc318185acfe01c4a8edfbb (diff)
map/unmap textures
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_context.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 264f3d6e584..ac5651f9a78 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -91,6 +91,14 @@ static void map_surfaces(struct softpipe_context *sp)
pipe->region_map(pipe, sps->surface.region);
}
+ /* textures */
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ struct pipe_mipmap_tree *mt = sp->texture[i];
+ if (mt) {
+ pipe->region_map(pipe, mt->region);
+ }
+ }
+
/* XXX depth & stencil bufs */
}
@@ -109,6 +117,15 @@ static void unmap_surfaces(struct softpipe_context *sp)
struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.zbuf);
pipe->region_unmap(pipe, sps->surface.region);
}
+
+ /* textures */
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ struct pipe_mipmap_tree *mt = sp->texture[i];
+ if (mt) {
+ pipe->region_unmap(pipe, mt->region);
+ }
+ }
+
/* XXX depth & stencil bufs */
}