diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-15 16:40:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-15 18:24:20 +0300 |
commit | daff18dd286920c0636329c704c3758f90be0013 (patch) | |
tree | 35e8be3c10ffb81c95ecce8d94fe5b326664c96c /source/blender/gpu | |
parent | 846e5f1dc0dd969d9a472a6bfb272375c45e2811 (diff) |
Fix T63349: image texture garbage collection causing freezes
Images were being freed often because the tagging for when the image was last
used was missing.
Differential Revision: https://developer.blender.org/D5252
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index d1d5e1d89a2..be3655648f5 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -475,6 +475,9 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int textarget ima->gpuflag &= ~IMA_GPU_REFRESH; } + /* Tag as in active use for garbage collector. */ + BKE_image_tag_time(ima); + /* Test if we already have a texture. */ GPUTexture **tex = gpu_get_image_gputexture(ima, textarget); if (*tex) { |