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:
authorJeroen Bakker <jeroen@blender.org>2021-12-07 13:30:50 +0300
committerJeroen Bakker <jeroen@blender.org>2021-12-07 13:30:50 +0300
commitcd494087c1f214771d952d110ed2a1a685e7ec28 (patch)
treeeed86f5d316f84a97656fd857699488e3d82a921
parentb069218a5563662b08b3057c96e5e0be877c16ca (diff)
Fix crash when switching back from render preview.
Issue is that external engine uses the gpu info. but overwrote the instance data. The draw manager would then detect instance data and required the engine type to have a instance free callback. The solution is to save some space in the engine data to hold an empty and unused instance_data attribute to comply with `ViewportEngineData` struct.
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h2
-rw-r--r--source/blender/draw/engines/external/external_engine.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index f51b4fa0127..87f84ec584d 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -992,6 +992,8 @@ typedef struct EEVEE_Data {
EEVEE_TextureList *txl;
EEVEE_PassList *psl;
EEVEE_StorageList *stl;
+ void *instance_data;
+
char info[GPU_INFO_SIZE];
} EEVEE_Data;
diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c
index 1877d3a4b43..1d899c3935b 100644
--- a/source/blender/draw/engines/external/external_engine.c
+++ b/source/blender/draw/engines/external/external_engine.c
@@ -88,6 +88,8 @@ typedef struct EXTERNAL_Data {
EXTERNAL_TextureList *txl;
EXTERNAL_PassList *psl;
EXTERNAL_StorageList *stl;
+ void *instance_data;
+
char info[GPU_INFO_SIZE];
} EXTERNAL_Data;