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:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_capabilities.h2
-rw-r--r--source/blender/gpu/intern/gpu_capabilities.cc5
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/GPU_capabilities.h b/source/blender/gpu/GPU_capabilities.h
index e02fbaa6d04..b95053a3715 100644
--- a/source/blender/gpu/GPU_capabilities.h
+++ b/source/blender/gpu/GPU_capabilities.h
@@ -38,7 +38,7 @@ int GPU_max_textures_vert(void);
int GPU_max_textures_geom(void);
int GPU_max_textures_frag(void);
-int GPU_texture_size_with_limit(int res);
+int GPU_texture_size_with_limit(int res, bool limit_gl_texture_size);
bool GPU_mip_render_workaround(void);
bool GPU_depth_blitting_workaround(void);
diff --git a/source/blender/gpu/intern/gpu_capabilities.cc b/source/blender/gpu/intern/gpu_capabilities.cc
index 1d2b0e5c7a8..6d9182dcf17 100644
--- a/source/blender/gpu/intern/gpu_capabilities.cc
+++ b/source/blender/gpu/intern/gpu_capabilities.cc
@@ -49,10 +49,11 @@ int GPU_max_texture_size(void)
return GCaps.max_texture_size;
}
-int GPU_texture_size_with_limit(int res)
+int GPU_texture_size_with_limit(int res, bool limit_gl_texture_size)
{
int size = GPU_max_texture_size();
- int reslimit = (U.glreslimit != 0) ? min_ii(U.glreslimit, size) : size;
+ int reslimit = (limit_gl_texture_size && (U.glreslimit != 0)) ? min_ii(U.glreslimit, size) :
+ size;
return min_ii(reslimit, res);
}