diff options
author | Angus Stanton <abstanton> | 2022-08-03 09:14:58 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-08-03 09:15:12 +0300 |
commit | ea70687dd5b9474ce183b7de12e42ec5201864e0 (patch) | |
tree | 241ea9199bbf110d548d0a694488c628d0c56406 /source/blender/imbuf/intern | |
parent | abc46d5aeb49a71ad537c86daa3d78451f63e6d3 (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/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/util_gpu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/util_gpu.c b/source/blender/imbuf/intern/util_gpu.c index 5feb0ceb515..727704e27e8 100644 --- a/source/blender/imbuf/intern/util_gpu.c +++ b/source/blender/imbuf/intern/util_gpu.c @@ -290,3 +290,13 @@ GPUTexture *IMB_create_gpu_texture(const char *name, return tex; } + +eGPUTextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf, bool high_bitdepth) +{ + eGPUTextureFormat gpu_texture_format; + eGPUDataFormat gpu_data_format; + + imb_gpu_get_format(ibuf, high_bitdepth, &gpu_data_format, &gpu_texture_format); + + return gpu_texture_format; +} |