diff options
author | Marek Olšák <marek.olsak@amd.com> | 2021-01-10 00:29:01 -0500 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2021-01-30 15:38:15 -0500 |
commit | e93b42c214aa02d7393f12f07572ddececdd0e5e (patch) | |
tree | a75e1be60c6a09b900cee7ff002098b0990d1d48 /src/gallium/drivers/r600/r600_cs.h | |
parent | 205e737f51baf2958c047ae6ce3af66bffb52b37 (diff) |
ac,radeonsi: track memory usage in KB to reduce types from uint64 to uint32
Decreasing the time spent in radeon_cs_memory_below_limit is the motivation.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>
Diffstat (limited to 'src/gallium/drivers/r600/r600_cs.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_cs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_cs.h b/src/gallium/drivers/r600/r600_cs.h index 80f7162049c..71e606b9b3c 100644 --- a/src/gallium/drivers/r600/r600_cs.h +++ b/src/gallium/drivers/r600/r600_cs.h @@ -45,8 +45,8 @@ radeon_cs_memory_below_limit(struct r600_common_screen *screen, struct radeon_cmdbuf *cs, uint64_t vram, uint64_t gtt) { - vram += cs->used_vram; - gtt += cs->used_gart; + vram += (uint64_t)cs->used_vram_kb * 1024; + gtt += (uint64_t)cs->used_gart_kb * 1024; /* Anything that goes above the VRAM size should go to GTT. */ if (vram > screen->info.vram_size) |