diff options
author | Dave Airlie <[email protected]> | 2010-09-17 12:51:04 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-09-17 15:29:31 +1000 |
commit | 189a59751352208cb0386131f9ad82256ec9bed9 (patch) | |
tree | a1637cf7ad4aca4c5e7984e799dbfa349d20c8ee /src/gallium/winsys/r600/drm/radeon.c | |
parent | 7c1fcc41be15b6d648f84c8c1870a3a00575a48f (diff) |
r600g: use malloc bufmgr for constant buffers
Diffstat (limited to 'src/gallium/winsys/r600/drm/radeon.c')
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon.c b/src/gallium/winsys/r600/drm/radeon.c index 2135b07ab63..7b88075c568 100644 --- a/src/gallium/winsys/r600/drm/radeon.c +++ b/src/gallium/winsys/r600/drm/radeon.c @@ -20,6 +20,7 @@ #include <unistd.h> #include <string.h> #include <errno.h> +#include <pipebuffer/pb_bufmgr.h> #include "xf86drm.h" #include "radeon_priv.h" #include "radeon_drm.h" @@ -125,6 +126,10 @@ struct radeon *radeon_new(int fd, unsigned device) __func__, radeon->device); break; } + + radeon->mman = pb_malloc_bufmgr_create(); + if (!radeon->mman) + return NULL; return radeon; } @@ -143,6 +148,8 @@ struct radeon *radeon_decref(struct radeon *radeon) if (--radeon->refcount > 0) { return NULL; } + + radeon->mman->destroy(radeon->mman); drmClose(radeon->fd); free(radeon); return NULL; |