svga: re-enable deleted surface caching
authorBrian Paul <brianp@vmware.com>
Thu, 8 Dec 2011 00:11:00 +0000 (17:11 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Feb 2012 14:49:07 +0000 (07:49 -0700)
Basically, instead of immediately freeing deleted surfaces, hang onto
them in a cache to do quick re-allocation.  This helps when surfaces
are frequently destroyed and then reallocated a bit later.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_resource_texture.c

index 92286f90fb78012b5f2dbe417b0da87ca8c1b851..c5b830660f57745788e09b40f4d8d2944e5c27d1 100644 (file)
@@ -433,8 +433,7 @@ svga_texture_create(struct pipe_screen *screen,
       tex->key.numFaces = 1;
    }
 
-   /* XXX: Disabled for now */
-   tex->key.cachable = 0;
+   tex->key.cachable = 1;
 
    if (template->bind & PIPE_BIND_SAMPLER_VIEW)
       tex->key.flags |= SVGA3D_SURFACE_HINT_TEXTURE;