From 549d9f87276a20036372317b1f988c4d0ef8c40c Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 8 Feb 2021 15:42:59 +0100 Subject: Fix T81206: Do not limit gl texture size in image editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch will show textures in the image editor with the maximum available resolution determined by the GPU Hardware/Driver. Currently the size is limited by the user preference texture size limit. An image user can set the `IMA_SHOW_MAX_RESOLUTION` flag to request gpu textures in the max supported resolution. When this flag isn't set the gpu texture is limited by the user preference setting. When the gl resolution limit is disabled the GPU texture is always created for the max supported resolution. Reviewed By: Clément Foucault Maniphest Tasks: T81206 Differential Revision: https://developer.blender.org/D9160 --- source/blender/imbuf/intern/util_gpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/imbuf/intern') diff --git a/source/blender/imbuf/intern/util_gpu.c b/source/blender/imbuf/intern/util_gpu.c index fc89de476a1..8bedf8eb93c 100644 --- a/source/blender/imbuf/intern/util_gpu.c +++ b/source/blender/imbuf/intern/util_gpu.c @@ -219,10 +219,12 @@ void IMB_update_gpu_texture_sub(GPUTexture *tex, GPUTexture *IMB_create_gpu_texture(const char *name, ImBuf *ibuf, bool use_high_bitdepth, - bool use_premult) + bool use_premult, + bool limit_gl_texture_size) { GPUTexture *tex = NULL; - int size[2] = {GPU_texture_size_with_limit(ibuf->x), GPU_texture_size_with_limit(ibuf->y)}; + int size[2] = {GPU_texture_size_with_limit(ibuf->x, limit_gl_texture_size), + GPU_texture_size_with_limit(ibuf->y, limit_gl_texture_size)}; bool do_rescale = (ibuf->x != size[0]) || (ibuf->y != size[1]); #ifdef WITH_DDS -- cgit v1.2.3