projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f98ba41
)
winsys/amdgpu: count buffer size only once
author
Marek Olšák
<marek.olsak@amd.com>
Thu, 28 Apr 2016 15:30:16 +0000
(17:30 +0200)
committer
Marek Olšák
<marek.olsak@amd.com>
Mon, 2 May 2016 20:49:25 +0000
(22:49 +0200)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
patch
|
blob
|
history
diff --git
a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 1536829b36316660510ef09cec89bb6bfdf76a47..03e45a95920c891c12032de96b58ab09c7c9e90d 100644
(file)
--- a/
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@
-525,10
+525,10
@@
static unsigned amdgpu_cs_add_buffer(struct radeon_winsys_cs *rcs,
unsigned index = amdgpu_add_buffer(cs, bo, usage, bo->initial_domain,
priority, &added_domains);
- if (added_domains & RADEON_DOMAIN_GTT)
- cs->used_gart += bo->base.size;
if (added_domains & RADEON_DOMAIN_VRAM)
cs->used_vram += bo->base.size;
+ else if (added_domains & RADEON_DOMAIN_GTT)
+ cs->used_gart += bo->base.size;
return index;
}