summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_screen_cache.c
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2014-02-08 09:51:15 -0800
committerBrian Paul <[email protected]>2014-02-14 08:21:44 -0700
commit141e39a8936a7b19fd857a35ea2d200daf1777c7 (patch)
treefac992f450ba785d7e3c285a841ea113aae1e2bf /src/gallium/drivers/svga/svga_screen_cache.c
parentfe6a854477c2ed30c37c200668a4dc86512120f7 (diff)
svga/winsys: Propagate surface shared information to the winsys
The linux winsys needs to know whether a surface is shared. For guest-backed surfaces we need this information to avoid allocating a mob out of the mob cache for shared surfaces, but instead allocate a shared mob, that is never put in the mob cache, from the kernel. Also previously, all surfaces were given the "shareable" attribute when allocated from the kernel. This is too permissive for client-local surfaces. Now that we have the needed info, only set the "shareable" attribute if the client indicates that it needs to share the surface. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.1" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen_cache.c')
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 71dc72e7b8a..307af1b6bf2 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -449,6 +449,8 @@ svga_screen_surface_create(struct svga_screen *svgascreen,
handle = sws->surface_create(sws,
key->flags,
key->format,
+ key->cachable ?
+ 0 : SVGA_SURFACE_USAGE_SHARED,
key->size,
key->numFaces,
key->numMipLevels);