[Bf-blender-cvs] [47498c4] master: Fix T47635: Texture paint performance regression
Campbell Barton
noreply at git.blender.org
Tue Mar 1 21:06:45 CET 2016
Commit: 47498c4f05ee19094be272bc0e4c44ee568fbb0d
Author: Campbell Barton
Date: Wed Mar 2 06:57:26 2016 +1100
Branches: master
https://developer.blender.org/rB47498c4f05ee19094be272bc0e4c44ee568fbb0d
Fix T47635: Texture paint performance regression
Flipped bindcode check in D1414 caused projection paint to always do full updates.
===================================================================
M source/blender/gpu/intern/gpu_draw.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 71be262..1c22c89 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 */
More information about the Bf-blender-cvs
mailing list