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:
authorCampbell Barton <ideasman42@gmail.com>2016-03-01 22:57:26 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-03-04 19:11:57 +0300
commit322fa278296b29099b9beb70c7e415e2d7f19d6d (patch)
tree4a8ea3a38b7ec1d782488a14cad0e0608e4a7432
parent562a488fb05f8a45db210726516a545ab59923d5 (diff)
Fix T47635: Texture paint performance regression
Flipped bindcode check in D1414 caused projection paint to always do full updates.
-rw-r--r--source/blender/gpu/intern/gpu_draw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 71be262be37..1c22c89abf9 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1227,8 +1227,11 @@ static bool GPU_check_scaled_image(ImBuf *ibuf, Image *ima, float *frect, int x,
void GPU_paint_update_image(Image *ima, ImageUser *iuser, int x, int y, int w, int h)
{
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
-
- if (ima->repbind || (GPU_get_mipmap() && !GTS.gpu_mipmap) || BKE_image_has_bindcode(ima) || !ibuf ||
+
+ if (ima->repbind ||
+ (!GTS.gpu_mipmap && GPU_get_mipmap()) ||
+ (ima->bindcode[TEXTARGET_TEXTURE_2D] == 0) ||
+ (ibuf == NULL) ||
(w == 0) || (h == 0))
{
/* these cases require full reload still */