diff options
author | Thomas Hellstrom <[email protected]> | 2014-02-08 09:51:15 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-02-14 08:21:44 -0700 |
commit | 141e39a8936a7b19fd857a35ea2d200daf1777c7 (patch) | |
tree | fac992f450ba785d7e3c285a841ea113aae1e2bf /src/gallium/drivers/svga/svga_winsys.h | |
parent | fe6a854477c2ed30c37c200668a4dc86512120f7 (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_winsys.h')
-rw-r--r-- | src/gallium/drivers/svga/svga_winsys.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index f1f92376108..879321f745c 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -79,6 +79,7 @@ struct winsys_handle; #define SVGA_FENCE_FLAG_EXEC (1 << 0) #define SVGA_FENCE_FLAG_QUERY (1 << 1) +#define SVGA_SURFACE_USAGE_SHARED (1 << 0) /** Opaque surface handle */ struct svga_winsys_surface; @@ -252,8 +253,17 @@ struct svga_winsys_screen /** - * This creates a "surface" object in the SVGA3D device, - * and returns the surface ID (sid). Surfaces are generic + * This creates a "surface" object in the SVGA3D device. + * + * \param sws Pointer to an svga_winsys_context + * \param flags Device surface create flags + * \param format Format Device surface format + * \param usage Winsys usage: bitmask of SVGA_SURFACE_USAGE_x flags + * \param size Surface size given in device format + * \param numFaces Number of faces of the surface (1 or 6) + * \param numMipLevels Number of mipmap levels for each face + * + * Returns the surface ID (sid). Surfaces are generic * containers for host VRAM objects like textures, vertex * buffers, and depth/stencil buffers. * @@ -284,6 +294,7 @@ struct svga_winsys_screen (*surface_create)(struct svga_winsys_screen *sws, SVGA3dSurfaceFlags flags, SVGA3dSurfaceFormat format, + unsigned usage, SVGA3dSize size, uint32 numFaces, uint32 numMipLevels); |