i915: Made region pool a slabpool
authorJakob Bornecrantz <jakob@tungstengraphics.com>
Tue, 17 Jun 2008 15:46:45 +0000 (17:46 +0200)
committerJakob Bornecrantz <jakob@tungstengraphics.com>
Tue, 17 Jun 2008 15:46:45 +0000 (17:46 +0200)
src/gallium/winsys/common/intel_drm/intel_be_device.c

index 0fc1894eaaa9b7bb0b48b7c14806d536121ec17c..3eed0fe410718008da7b6612a2c232cac21106ec 100644 (file)
@@ -220,7 +220,18 @@ intel_be_init_device(struct intel_be_device *dev, int fd)
 
        dev->mallocPool = driMallocPoolInit();
        dev->staticPool = driDRMPoolInit(dev->fd);
-       dev->regionPool = driDRMPoolInit(dev->fd);
+       /* Sizes: 64 128 256 512 1024 2048 4096 8192 16384 32768 */
+       dev->regionPool = driSlabPoolInit(dev->fd,
+                                         DRM_BO_FLAG_READ |
+                                         DRM_BO_FLAG_WRITE |
+                                         DRM_BO_FLAG_MEM_TT,
+                                         DRM_BO_FLAG_READ |
+                                         DRM_BO_FLAG_WRITE |
+                                         DRM_BO_FLAG_MEM_TT,
+                                         64,
+                                         10, 120, 4096 * 64, 0,
+                                         dev->fMan);
+
        dev->vertexPool = driSlabPoolInit(dev->fd,
                                          DRM_BO_FLAG_READ |
                                          DRM_BO_FLAG_WRITE |