diff options
author | Dave Airlie <[email protected]> | 2010-09-17 13:37:31 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-09-17 15:29:31 +1000 |
commit | a927d0477a47e29d72e518880979e11e8c0f98e7 (patch) | |
tree | 2f77bc4606b176c52bd8fdb86798059c476e7a35 /src/gallium/winsys/r600/drm/radeon.c | |
parent | da96313afe3cff66d8ae0c9675a6299b3d7510f9 (diff) |
r600g: add winsys bo caching.
this adds the bo caching layer and uses it for vertex/index/constant bos.
ctx needs to take references on hw bos so the flushing works okay, also
needs to flush the maps.
Diffstat (limited to 'src/gallium/winsys/r600/drm/radeon.c')
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon.c b/src/gallium/winsys/r600/drm/radeon.c index 8a5acf62562..f39d020559c 100644 --- a/src/gallium/winsys/r600/drm/radeon.c +++ b/src/gallium/winsys/r600/drm/radeon.c @@ -133,6 +133,9 @@ struct radeon *radeon_new(int fd, unsigned device) radeon->kman = radeon_bo_pbmgr_create(radeon); if (!radeon->kman) return NULL; + radeon->cman = pb_cache_manager_create(radeon->kman, 100000); + if (!radeon->cman) + return NULL; return radeon; } @@ -153,6 +156,7 @@ struct radeon *radeon_decref(struct radeon *radeon) } radeon->mman->destroy(radeon->mman); + radeon->cman->destroy(radeon->cman); radeon->kman->destroy(radeon->kman); drmClose(radeon->fd); free(radeon); |