softpipe: some improvements to texture tile cache
[mesa.git] / src / gallium / drivers / softpipe / sp_context.c
index 800f944838ad1728b08fbb46125bff88f186a1fb..c2d882a819740e2382884da1da348236958eb6da 100644 (file)
@@ -57,7 +57,7 @@ softpipe_map_surfaces(struct softpipe_context *sp)
 {
    unsigned i;
 
-   for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
+   for (i = 0; i < sp->framebuffer.nr_cbufs; i++) {
       sp_tile_cache_map_surfaces(sp->cbuf_cache[i]);
    }
 
@@ -73,11 +73,11 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
 {
    uint i;
 
-   for (i = 0; i < sp->framebuffer.num_cbufs; i++)
+   for (i = 0; i < sp->framebuffer.nr_cbufs; i++)
       sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
    sp_flush_tile_cache(sp, sp->zsbuf_cache);
 
-   for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
+   for (i = 0; i < sp->framebuffer.nr_cbufs; i++) {
       sp_tile_cache_unmap_surfaces(sp->cbuf_cache[i]);
    }
    sp_tile_cache_unmap_surfaces(sp->zsbuf_cache);
@@ -87,7 +87,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
 static void softpipe_destroy( struct pipe_context *pipe )
 {
    struct softpipe_context *softpipe = softpipe_context( pipe );
-   struct pipe_winsys *ws = pipe->winsys;
+   struct pipe_screen *screen = pipe->screen;
    uint i;
 
    if (softpipe->draw)
@@ -116,7 +116,7 @@ static void softpipe_destroy( struct pipe_context *pipe )
 
    for (i = 0; i < Elements(softpipe->constants); i++) {
       if (softpipe->constants[i].buffer) {
-         winsys_buffer_reference(ws, &softpipe->constants[i].buffer, NULL);
+         pipe_buffer_reference(screen, &softpipe->constants[i].buffer, NULL);
       }
    }