Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-03-24 03:03:47 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-03-24 11:24:58 +0300
commitc91d39e47350fac63635abd815162a59c0552cf4 (patch)
tree9ac1917e3f4ba9dd99fd6427a3ab1cde930911d4 /source/blender/blenkernel
parent3bc0e39850a1c4c8e45bd393960acf2d483090da (diff)
Fix missing updates for external render engines rendering tiles
For render image buffers to be acquired, a lock must be provided. Also fixed wrong usage of release, it must always be called regardless if the returned image buffer is NULL.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_image_partial_update.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_image_partial_update.hh b/source/blender/blenkernel/BKE_image_partial_update.hh
index b00ec98353c..ec506ff4370 100644
--- a/source/blender/blenkernel/BKE_image_partial_update.hh
+++ b/source/blender/blenkernel/BKE_image_partial_update.hh
@@ -180,6 +180,7 @@ class ImageTileData : AbstractTileData {
* Can be nullptr when the file doesn't exist or when the tile hasn't been initialized.
*/
ImBuf *tile_buffer = nullptr;
+ void *tile_buffer_lock = nullptr;
ImageTileData(Image *image, ImageUser *image_user) : image(image)
{
@@ -192,14 +193,15 @@ class ImageTileData : AbstractTileData {
{
image_user.tile = new_tile_number;
tile = BKE_image_get_tile(image, new_tile_number);
- tile_buffer = BKE_image_acquire_ibuf(image, &image_user, NULL);
+ tile_buffer = BKE_image_acquire_ibuf(image, &image_user, &tile_buffer_lock);
}
void free_data() override
{
- BKE_image_release_ibuf(image, tile_buffer, nullptr);
+ BKE_image_release_ibuf(image, tile_buffer, tile_buffer_lock);
tile = nullptr;
tile_buffer = nullptr;
+ tile_buffer_lock = nullptr;
}
};