[Mesa-dev] [PATCH 2/2] gallium/radeon: add the size only once in r600_context_add_resource_size
Marek Olšák
maraeo at gmail.com
Thu Apr 28 18:05:06 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeon/r600_pipe_common.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 929fecb..8649bbc 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -353,12 +353,10 @@ void r600_context_add_resource_size(struct pipe_context *ctx, struct pipe_resour
* In practice this gave very good estimate (+/- 10% of the target
* memory limit).
*/
- if (rr->domains & RADEON_DOMAIN_GTT) {
- rctx->gtt += rr->buf->size;
- }
- if (rr->domains & RADEON_DOMAIN_VRAM) {
+ if (rr->domains & RADEON_DOMAIN_VRAM)
rctx->vram += rr->buf->size;
- }
+ else if (rr->domains & RADEON_DOMAIN_GTT)
+ rctx->gtt += rr->buf->size;
}
/*
--
2.5.0
More information about the mesa-dev
mailing list