summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_screen_cache.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-11 10:04:07 -0700
committerBrian Paul <brianp@vmware.com>2009-12-11 10:04:07 -0700
commita087eb590d780cb82b49464e05ffc85123adce7e (patch)
treea2ac3ec2cc0b9001b350664d6e7915aba5e087a9 /src/gallium/drivers/svga/svga_screen_cache.c
parentcb640c8d40c4ee34160a14d646c244f44a5013f6 (diff)
parente128cc205e30540597ecd57849060a6bf4714d9f (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: src/gallium/state_trackers/xorg/xorg_xv.c src/mesa/drivers/dri/intel/intel_span.c
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen_cache.c')
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 8a06383f61..eff36e0bcc 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -277,6 +277,15 @@ svga_screen_surface_create(struct svga_screen *svgascreen,
while(size < key->size.width)
size <<= 1;
key->size.width = size;
+ /* Since we're reusing buffers we're effectively transforming all
+ * of them into dynamic buffers.
+ *
+ * It would be nice to not cache long lived static buffers. But there
+ * is no way to detect the long lived from short lived ones yet. A
+ * good heuristic would be buffer size.
+ */
+ key->flags &= ~SVGA3D_SURFACE_HINT_STATIC;
+ key->flags |= SVGA3D_SURFACE_HINT_DYNAMIC;
}
handle = svga_screen_cache_lookup(svgascreen, key);