From c7877b9dab822a9f33aa351cff2ce849a3f2fa32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Sun, 8 May 2016 12:53:23 -0500 Subject: [PATCH] winsys/amdgpu: decay max_ib_size over time MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So that memory use will eventually decrease again after a temporary peak. Reviewed-by: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 6195de9bc3c..fefa5d6db53 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -461,6 +461,8 @@ static bool amdgpu_get_new_ib(struct radeon_winsys *ws, struct amdgpu_cs *cs, amdgpu_ib_max_submit_dwords(ib_type))); } + ib->max_ib_size = ib->max_ib_size - ib->max_ib_size / 32; + ib->base.prev_dw = 0; ib->base.num_prev = 0; ib->base.current.cdw = 0; -- 2.30.2