svga: Always pass SVGA3D_SURFACE_HINT_DYNAMIC.

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.
This commit is contained in:
José Fonseca 2009-12-11 13:15:12 +00:00
parent 16876b8328
commit 8469baf41b
1 changed files with 9 additions and 0 deletions

View File

@ -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);