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 <jbakker>2021-12-07 12:33:55 +0300
committerJeroen Bakker <jeroen@blender.org>2021-12-07 12:34:38 +0300
commitb069218a5563662b08b3057c96e5e0be877c16ca (patch)
treed4079211cbefefa07af58f89992a5ea840368776 /source/blender/draw/engines/select/select_engine.c
parente2f0b4a0cbe5934dbd591caa53f9259eee431cee (diff)
DrawManager: Engine Instance Data.
In the original design draw engines had to copy with a limitation that they were not allowed to reuse complex data structures between drawing calls. Data that could be reused were limited to: - GPUFramebuffers - GPUTextures - Memory that could be removed calling MEM_freeN (storage list) - DRWPass This is fine when the storage list contains arrays or structs but when more complex data types (vectors, maps) etc wasn't possible. This patch adds instance_data that can be reused between drawing calls. The instance_data is controlled by the draw engine and doesn't need to be limited as described above. When an engines stores instance_data it must implement the `DrawEngineType.instance_free` callback to free the data. The patch originates from eevee rewrite. But was added to master as the image engine rewrite also has a need for it. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13425
Diffstat (limited to 'source/blender/draw/engines/select/select_engine.c')
-rw-r--r--source/blender/draw/engines/select/select_engine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c
index 20edd78597b..7f9645013ce 100644
--- a/source/blender/draw/engines/select/select_engine.c
+++ b/source/blender/draw/engines/select/select_engine.c
@@ -363,6 +363,7 @@ DrawEngineType draw_engine_select_type = {
&select_data_size,
&select_engine_init,
&select_engine_free,
+ NULL, /* instance_free */
&select_cache_init,
&select_cache_populate,
NULL,