summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-01-10 01:11:53 +0100
committerJohn Doe <glisse@freedesktop.org>2008-01-10 01:14:07 +0100
commit934468296c33a04125e42e5d0f8747f65405a393 (patch)
treebc73e0305a77a23d2f1be591ba78f78e7494b40f /src/mesa/pipe
parent1c5f27a18b775b3784fcd265d60e0affa0b31581 (diff)
softpipe: map only once in softpipe_map_surfaces
softpipe_map_surfaces get call several time but softpipe_unmap_surfaces get call only once. So to make sure stuff are properly unmap when softpipe_unmap_surfaces get call we map surfaces only one time in softpipe_map_surfaces.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index c7af63cc2d..0759092305 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -80,16 +80,16 @@ softpipe_map_surfaces(struct softpipe_context *sp)
for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
ps = sp->framebuffer.cbufs[i];
- if (ps->buffer)
+ if (ps->buffer && !ps->map)
pipe_surface_map(ps);
}
ps = sp->framebuffer.zbuf;
- if (ps && ps->buffer)
+ if (ps && ps->buffer && !ps->map)
pipe_surface_map(ps);
ps = sp->framebuffer.sbuf;
- if (ps && ps->buffer)
+ if (ps && ps->buffer && !ps->map)
pipe_surface_map(ps);
}