diff options
author | Marek Olšák <[email protected]> | 2014-08-20 23:53:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-09-01 20:17:48 +0200 |
commit | b419c651fbbf3660d7b53623dfa2e5a4c9bd3b98 (patch) | |
tree | c20732bea135011f51aafda7ed0dec1db630d934 /src/gallium/winsys/radeon/drm | |
parent | bba7d29a86862df89f43b682be674c33326fa248 (diff) |
gallium/pb_bufmgr_cache: limit the size of cache
This should make a machine which is running piglit more responsive at times.
e.g. streaming-texture-leak can easily eat 600 MB because of how fast it
creates new textures.
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 820cc90cda0..3b695f98534 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -671,16 +671,20 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) ws->kman = radeon_bomgr_create(ws); if (!ws->kman) goto fail; - ws->cman_vram = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0); + ws->cman_vram = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0, + ws->info.vram_size / 8); if (!ws->cman_vram) goto fail; - ws->cman_vram_gtt_wc = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0); + ws->cman_vram_gtt_wc = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0, + ws->info.vram_size / 8); if (!ws->cman_vram_gtt_wc) goto fail; - ws->cman_gtt = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0); + ws->cman_gtt = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0, + ws->info.gart_size / 8); if (!ws->cman_gtt) goto fail; - ws->cman_gtt_wc = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0); + ws->cman_gtt_wc = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0, + ws->info.gart_size / 8); if (!ws->cman_gtt_wc) goto fail; |