From 03fbfb30923ed5aaab4a389b8c0dbd5b71c0e35b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 30 Aug 2022 17:20:00 +0200 Subject: 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. --- source/blender/render/RE_engine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/render/RE_engine.h') diff --git a/source/blender/render/RE_engine.h b/source/blender/render/RE_engine.h index d7815ef3f3c..5d10da8dac0 100644 --- a/source/blender/render/RE_engine.h +++ b/source/blender/render/RE_engine.h @@ -15,6 +15,7 @@ #include "BLI_threads.h" +struct BakeTargets; struct BakePixel; struct Depsgraph; struct Main; @@ -140,9 +141,10 @@ typedef struct RenderEngine { struct ReportList *reports; struct { + const struct BakeTargets *targets; const struct BakePixel *pixels; float *result; - int width, height, depth; + int image_id; int object_id; } bake; -- cgit v1.2.3