diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-08-30 18:20:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-31 21:04:14 +0300 |
commit | b9998541e193b1f30728fc034c7a10daae183a08 (patch) | |
tree | bf2ed1b6f32006f93d2f36e946da404eff21704c /source/blender/render/RE_bake.h | |
parent | e665f0f497f6ea6a4cff36e977bbac29dd762c00 (diff) |
Fix part of T100626: Cycles not using tiles for baking
Leading to excessive memory usage compared to Blender 2.93. There's still
some avoidable memory usage remaining, due to the full float buffer in the
new image editor drawing and not loading the cached EXR from disk in tiles.
Main difficulty was handling multi-image baking and disk caches, which is
solved by associating a unique layer name with each image so it can be
matched when reading back the image from the disk.
Also some minor header changes to be able to use RE_MAXNAME in RE_bake.h.
Diffstat (limited to 'source/blender/render/RE_bake.h')
-rw-r--r-- | source/blender/render/RE_bake.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/render/RE_bake.h b/source/blender/render/RE_bake.h index 56c66df5925..ebfc7509504 100644 --- a/source/blender/render/RE_bake.h +++ b/source/blender/render/RE_bake.h @@ -7,6 +7,8 @@ #pragma once +#include "RE_pipeline.h" + struct Depsgraph; struct ImBuf; struct MLoopUV; @@ -24,6 +26,9 @@ typedef struct BakeImage { int width; int height; size_t offset; + + /* For associating render result layer with image. */ + char render_layer_name[RE_MAXNAME]; } BakeImage; typedef struct BakeTargets { |