diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-12 14:03:15 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-12 14:03:27 +0400 |
commit | 6e8e94d806fa429d65addc4a45250fcd1f1b0bee (patch) | |
tree | 53ec416f8555de77a196fa99ab81e30aaa84ba7e /source/blender/gpu/intern/gpu_draw.c | |
parent | d425cb06f691a573239e1f31c3394f22cbf6cdd6 (diff) |
Fix undo in texture painting not refreshing float images in viewport if
16 bit float textures was off
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |