Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/info_stats.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| SCENE_STATS_FMT_INT(totgplayer); | SCENE_STATS_FMT_INT(totgplayer); | ||||
| SCENE_STATS_FMT_INT(totgpframe); | SCENE_STATS_FMT_INT(totgpframe); | ||||
| SCENE_STATS_FMT_INT(totgpstroke); | SCENE_STATS_FMT_INT(totgpstroke); | ||||
| SCENE_STATS_FMT_INT(totgppoint); | SCENE_STATS_FMT_INT(totgppoint); | ||||
| #undef SCENE_STATS_FMT_INT | #undef SCENE_STATS_FMT_INT | ||||
| /* get memory statistics */ | /* 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); | ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, TIP_(" | Mem: %s"), formatted_mem); | ||||
| if (mmap_in_use) { | 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); | BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_(" (%s)"), formatted_mem); | ||||
| } | } | ||||
| if (GPU_mem_stats_supported()) { | if (GPU_mem_stats_supported()) { | ||||
| int gpu_free_mem, gpu_tot_memory; | int gpu_free_mem, gpu_tot_memory; | ||||
| GPU_mem_stats_get(&gpu_tot_memory, &gpu_free_mem); | 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); | ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, TIP_(" | Free GPU Mem: %s"), formatted_mem); | ||||
| if (gpu_tot_memory) { | 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); | BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_("/%s"), formatted_mem); | ||||
| } | } | ||||
| } | } | ||||
| s = stats->infostr; | s = stats->infostr; | ||||
| ofs = 0; | ofs = 0; | ||||
| if (object_mode == OB_MODE_OBJECT) { | if (object_mode == OB_MODE_OBJECT) { | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||