diff options
author | Marek Olšák <[email protected]> | 2016-04-28 16:57:09 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-04-28 21:06:31 +0200 |
commit | 1a8c2ccb2441f7a885c345adef1c882e924f30a6 (patch) | |
tree | 282d5de3f15fd7028e07a96bf7e81b1cad6c3812 | |
parent | 8e43bc0eb67b39bcac74ba74510442ecaf95cf0a (diff) |
gallium/radeon: add the size only once in r600_context_add_resource_size
Reviewed-by: Alex Deucher <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 8 |
1 files 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 823ba46e8c9..3c08221ca64 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; } /* |