diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-02-14 12:33:56 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-02-14 12:33:56 +0300 |
commit | ab71d833c775dce9efa25398ad3079729d404951 (patch) | |
tree | 18c5d089bb17606f685abc4674f2c98a4a8cdaa8 /source/blender/blenkernel/intern | |
parent | f0e32ef4ff34f8cf8ff85706fd863a858f5849b6 (diff) |
Phase out IMA_GPU_REFRESH.
IMA_GPU_REFRESH is replaced by
BKE_image_partial_update_mark_full_update and should not be used
anymore.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image_gpu.cc | 9 |
2 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 040257fe976..bf6ede77a79 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -4377,7 +4377,7 @@ RenderResult *BKE_image_acquire_renderresult(Scene *scene, Image *ima) } else { rr = BKE_image_get_renderslot(ima, ima->render_slot)->render; - ima->gpuflag |= IMA_GPU_REFRESH; + BKE_image_partial_update_mark_full_update(ima); } /* set proper views */ @@ -5745,7 +5745,7 @@ void BKE_image_user_frame_calc(Image *ima, ImageUser *iuser, int cfra) /* NOTE: a single texture and refresh doesn't really work when * multiple image users may use different frames, this is to * be improved with perhaps a GPU texture cache. */ - ima->gpuflag |= IMA_GPU_REFRESH; + BKE_image_partial_update_mark_full_update(ima); ima->gpuframenr = iuser->framenr; } diff --git a/source/blender/blenkernel/intern/image_gpu.cc b/source/blender/blenkernel/intern/image_gpu.cc index eaee1fd2c30..c43df7e157e 100644 --- a/source/blender/blenkernel/intern/image_gpu.cc +++ b/source/blender/blenkernel/intern/image_gpu.cc @@ -405,18 +405,9 @@ static GPUTexture *image_get_gpu_texture(Image *ima, ima->gpu_pass = requested_pass; ima->gpu_layer = requested_layer; ima->gpu_view = requested_view; - ima->gpuflag |= IMA_GPU_REFRESH; } #undef GPU_FLAGS_TO_CHECK - /* TODO(jbakker): We should replace the IMA_GPU_REFRESH flag with a call to - * BKE_image-partial_update_mark_full_update. Although the flag is quicker it leads to double - * administration. */ - if ((ima->gpuflag & IMA_GPU_REFRESH) != 0) { - BKE_image_partial_update_mark_full_update(ima); - ima->gpuflag &= ~IMA_GPU_REFRESH; - } - if (ima->runtime.partial_update_user == nullptr) { ima->runtime.partial_update_user = BKE_image_partial_update_create(ima); } |