From: Nicolai Hähnle Date: Sun, 8 May 2016 17:53:23 +0000 (-0500) Subject: winsys/amdgpu: decay max_ib_size over time X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7877b9dab822a9f33aa351cff2ce849a3f2fa32;p=mesa.git winsys/amdgpu: decay max_ib_size over time So that memory use will eventually decrease again after a temporary peak. Reviewed-by: Marek Olšák --- 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;