[Mesa-dev] [PATCH 4/4] winsys/radeon: count buffer size only once
Marek Olšák
maraeo at gmail.com
Sun May 1 13:35:29 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
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 11ea9bb..7a901a1 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.7.4
More information about the mesa-dev
mailing list