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:
authorAngus Stanton <abstanton>2022-08-03 09:14:58 +0300
committerJeroen Bakker <jeroen@blender.org>2022-08-03 09:15:12 +0300
commitea70687dd5b9474ce183b7de12e42ec5201864e0 (patch)
tree241ea9199bbf110d548d0a694488c628d0c56406 /source/blender/editors/space_image
parentabc46d5aeb49a71ad537c86daa3d78451f63e6d3 (diff)
Image: Display GPU layout in `uiTemplateImageInfo`
Add IMB_gpu_get_texture_format and GPU_texture_format_description to retrieve and 'stringify' an eGPUTextureFormat. These are then used in the image info panel used in several areas across blender. New Information: {F13330937} Reviewed By: jbakker Maniphest Tasks: T99998 Differential Revision: https://developer.blender.org/D15575
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_buttons.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 0a774ee679c..baaa521fc94 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1211,6 +1211,12 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" + Z"), len - ofs);
}
+ eGPUTextureFormat texture_format = IMB_gpu_get_texture_format(ibuf,
+ ima->flag & IMA_HIGH_BITDEPTH);
+ const char *texture_format_description = GPU_texture_format_description(
+ texture_format);
+ ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_(", %s"), texture_format_description);
+
uiItemL(col, str, ICON_NONE);
}