[Mesa-stable] [PATCH] winsys/svga: Replace the query mm buffer pool with a slab pool v2
Thomas Hellstrom
thellstrom at vmware.com
Mon Mar 31 22:51:41 PDT 2014
This is to avoid running out of query buffer space due to winsys
limitations.
v2: Correct email addresses.
Reported-and-tested-by: Brian Paul <brianp at vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
---
src/gallium/winsys/svga/drm/vmw_screen_pools.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_pools.c b/src/gallium/winsys/svga/drm/vmw_screen_pools.c
index c97b71f..e49262a 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_pools.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_pools.c
@@ -76,15 +76,19 @@ vmw_pools_cleanup(struct vmw_winsys_screen *vws)
*
* Typically this pool should be created on demand when we
* detect that the app will be using queries. There's nothing
- * special with this pool other than the backing kernel buffer size,
- * which is limited to 8192.
+ * special with this pool other than the backing kernel buffer sizes,
+ * which are limited to 8192.
*/
boolean
vmw_query_pools_init(struct vmw_winsys_screen *vws)
{
- vws->pools.query_mm = mm_bufmgr_create(vws->pools.gmr,
- VMW_QUERY_POOL_SIZE,
- 3 /* 8 alignment */);
+ struct pb_desc desc;
+
+ desc.alignment = 16;
+ desc.usage = ~(VMW_BUFFER_USAGE_SHARED | VMW_BUFFER_USAGE_SYNC);
+
+ vws->pools.query_mm = pb_slab_range_manager_create(vws->pools.gmr, 16, 128,
+ 8192, &desc);
if (!vws->pools.query_mm)
return FALSE;
--
1.7.10.4
More information about the mesa-stable
mailing list