From ca80c62e724bfc7d070f6317e628e6e73a836c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 9 Dec 2015 15:20:26 -0500 Subject: [PATCH] XXX winsys/radeon: limit buffer cache size --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 5d440eb..9f87928 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -731,8 +731,11 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) if (!ws->kman) goto fail; + unsigned long long cache_size = MIN3(ws->info.vram_size, ws->info.gart_size, 4 * 1024 * 1024); + fprintf(stderr, "radeon_drm_winsys_create: create cache of %llu bytes\n", + cache_size); ws->cman = pb_cache_manager_create(ws->kman, 500000, 2.0f, 0, - MIN2(ws->info.vram_size, ws->info.gart_size)); + cache_size); if (!ws->cman) goto fail; -- 2.5.0