diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2008-01-10 17:44:04 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2008-01-14 18:12:58 +0100 |
commit | c76efb96b405e43e3261d1dc9e8812fdb2cfbac8 (patch) | |
tree | 001828ee5bca72508f45deacfbb9f2318763ce99 /src/mesa/pipe/softpipe/sp_context.c | |
parent | a511200e5f0c384e68258879bab76563d8e01f01 (diff) |
Remove mapping fields from struct pipe_surface.
It's now the responsibility of surface users to keep track of their mappings.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_context.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_context.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 4f22539629..68c18e2d05 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -75,22 +75,15 @@ softpipe_is_format_supported( struct pipe_context *pipe, void softpipe_map_surfaces(struct softpipe_context *sp) { - struct pipe_surface *ps; unsigned i; for (i = 0; i < sp->framebuffer.num_cbufs; i++) { - ps = sp->framebuffer.cbufs[i]; - if (ps->buffer && !ps->map) - pipe_surface_map(ps); + sp_tile_cache_map_surfaces(sp->cbuf_cache[i]); } - ps = sp->framebuffer.zbuf; - if (ps && ps->buffer && !ps->map) - pipe_surface_map(ps); + sp_tile_cache_map_surfaces(sp->zbuf_cache); - ps = sp->framebuffer.sbuf; - if (ps && ps->buffer && !ps->map) - pipe_surface_map(ps); + sp_tile_cache_map_surfaces(sp->sbuf_cache); } @@ -100,7 +93,6 @@ softpipe_map_surfaces(struct softpipe_context *sp) void softpipe_unmap_surfaces(struct softpipe_context *sp) { - struct pipe_surface *ps; uint i; for (i = 0; i < sp->framebuffer.num_cbufs; i++) @@ -109,18 +101,12 @@ softpipe_unmap_surfaces(struct softpipe_context *sp) sp_flush_tile_cache(sp, sp->sbuf_cache); for (i = 0; i < sp->framebuffer.num_cbufs; i++) { - ps = sp->framebuffer.cbufs[i]; - if (ps->map) - pipe_surface_unmap(ps); + sp_tile_cache_unmap_surfaces(sp->cbuf_cache[i]); } - ps = sp->framebuffer.zbuf; - if (ps && ps->map) - pipe_surface_unmap(ps); + sp_tile_cache_unmap_surfaces(sp->zbuf_cache); - ps = sp->framebuffer.sbuf; - if (ps && ps->map) - pipe_surface_unmap(ps); + sp_tile_cache_unmap_surfaces(sp->sbuf_cache); } |