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
This commit is contained in:
parent
6d4b311888
commit
e781e9565d
|
@ -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),
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue