aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-04-28 17:30:24 +0200
committerMarek Olšák <[email protected]>2016-05-02 22:49:25 +0200
commit77af6bcc26a7be938e05b784da2abf8740466618 (patch)
tree3bcc6e5e281461560cad4c72cb3a50cb67fe1066 /src/gallium
parent3e3c43418edb5465e459335dd10b275782025d04 (diff)
winsys/radeon: count buffer size only once
Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c4
1 files 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;
}