Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-09-09 18:38:01 +0300
committerYimingWu <xp8110@outlook.com>2019-09-12 04:13:42 +0300
commit71d482bdeea91a7a533cbb0fcc4c3787c14f16a8 (patch)
tree9f205e9575fc15d60719481e821115d13ec6913a
parent5334b0439cdf2a309012d836787b5735364fa776 (diff)
UI: Format Memory Strings in Binary
Show all memory-related byte size strings calculated with a base of 1024. Differential Revision: https://developer.blender.org/D5714 Reviewed by Brecht Van Lommel
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index a31cb96c6c9..7ae5f91c615 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -4546,7 +4546,7 @@ void BKE_ptcache_update_info(PTCacheID *pid)
}
BLI_str_format_int_grouped(formatted_tot, totframes);
- BLI_str_format_byte_unit(formatted_mem, bytes, true);
+ BLI_str_format_byte_unit(formatted_mem, bytes, false);
BLI_snprintf(mem_info,
sizeof(mem_info),
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 5b5bb82ef98..f75bff6a914 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -218,7 +218,7 @@ void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
}
char formatted_mem[15];
- BLI_str_format_byte_unit(formatted_mem, eevee_lightcache_memsize_get(lcache), true);
+ BLI_str_format_byte_unit(formatted_mem, eevee_lightcache_memsize_get(lcache), false);
int irr_samples = eevee_lightcache_irradiance_sample_count(lcache);
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 106edc290d5..c76f02129a5 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -441,11 +441,11 @@ static void stats_string(ViewLayer *view_layer)
#undef SCENE_STATS_FMT_INT
/* get memory statistics */
- BLI_str_format_byte_unit(formatted_mem, mem_in_use - mmap_in_use, true);
+ BLI_str_format_byte_unit(formatted_mem, mem_in_use - mmap_in_use, false);
ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, TIP_(" | Mem: %s"), formatted_mem);
if (mmap_in_use) {
- BLI_str_format_byte_unit(formatted_mem, mmap_in_use, true);
+ BLI_str_format_byte_unit(formatted_mem, mmap_in_use, false);
BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_(" (%s)"), formatted_mem);
}
@@ -454,11 +454,11 @@ static void stats_string(ViewLayer *view_layer)
GPU_mem_stats_get(&gpu_tot_memory, &gpu_free_mem);
- BLI_str_format_byte_unit(formatted_mem, gpu_free_mem, true);
+ BLI_str_format_byte_unit(formatted_mem, gpu_free_mem, false);
ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, TIP_(" | Free GPU Mem: %s"), formatted_mem);
if (gpu_tot_memory) {
- BLI_str_format_byte_unit(formatted_mem, gpu_tot_memory, true);
+ BLI_str_format_byte_unit(formatted_mem, gpu_tot_memory, false);
BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_("/%s"), formatted_mem);
}
}