From 6e8e94d806fa429d65addc4a45250fcd1f1b0bee Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 12 Aug 2014 12:03:15 +0200 Subject: [PATCH] Fix undo in texture painting not refreshing float images in viewport if 16 bit float textures was off --- source/blender/gpu/intern/gpu_draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index fa9bc73dcbe..8abe7d5534a 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -530,12 +530,16 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, bool compare, boo * a high precision format only if it is available */ use_high_bit_depth = true; } + /* we may skip this in high precision, but if not, we need to have a valid buffer here */ + else if (ibuf->userflags & IB_RECT_INVALID) { + IMB_rect_from_float(ibuf); + } /* TODO unneeded when float images are correctly treated as linear always */ if (!is_data) do_color_management = true; - if (ibuf->rect==NULL) + if (ibuf->rect == NULL) IMB_rect_from_float(ibuf); }