summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-07-30 17:17:44 -0600
committerBrian <brian@i915.localnet.net>2007-07-30 17:17:44 -0600
commit4576d754c98e3fb5d413e294d48fb70a893defcf (patch)
tree96dd5125f77209567e7ce916e5a7be07e4eced7d /src/mesa/pipe/softpipe/sp_context.c
parent6558af67d380f2855b112ea3ce4dded9215c7cf7 (diff)
Lots of improvements to the surface-related code.
Z testing now works with i915 driver. Add gl_renderbuffer::surface pointer (and reverse pointer). Remove intel_surface and xmesa_surface types - no longer used.
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 */
}