From 09d0fa5be8da0087e6b8d239aee5d70e97655768 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Dec 2011 17:11:00 -0700 Subject: [PATCH] svga: re-enable deleted surface caching MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/svga/svga_resource_texture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 92286f90fb7..c5b830660f5 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -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; -- 2.30.2