From 77af6bcc26a7be938e05b784da2abf8740466618 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 28 Apr 2016 17:30:24 +0200 Subject: [PATCH] winsys/radeon: count buffer size only once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 11ea9bbe80b..7a901a175f8 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -331,10 +331,10 @@ static unsigned radeon_drm_cs_add_buffer(struct radeon_winsys_cs *rcs, unsigned index = radeon_add_buffer(cs, bo, usage, domains, priority, &added_domains); - if (added_domains & RADEON_DOMAIN_GTT) - cs->csc->used_gart += bo->base.size; if (added_domains & RADEON_DOMAIN_VRAM) cs->csc->used_vram += bo->base.size; + else if (added_domains & RADEON_DOMAIN_GTT) + cs->csc->used_gart += bo->base.size; return index; } -- 2.30.2