summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_context.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 6b44fabfa4..8655aa83fd 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -49,6 +49,13 @@ static void map_surfaces(struct softpipe_context *sp)
struct pipe_buffer *buf = &sps->surface.buffer;
buf->map(buf, PIPE_MAP_READ_WRITE);
}
+
+ if (sp->framebuffer.zbuf) {
+ struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.zbuf);
+ struct pipe_buffer *buf = &sps->surface.buffer;
+ buf->map(buf, PIPE_MAP_READ_WRITE);
+ }
+
/* XXX depth & stencil bufs */
}
@@ -62,6 +69,12 @@ static void unmap_surfaces(struct softpipe_context *sp)
struct pipe_buffer *buf = &sps->surface.buffer;
buf->unmap(buf);
}
+
+ if (sp->framebuffer.zbuf) {
+ struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.zbuf);
+ struct pipe_buffer *buf = &sps->surface.buffer;
+ buf->unmap(buf);
+ }
/* XXX depth & stencil bufs */
}