Blender Git Loki
Git Commits -> Revision a858188
Revision a858188 by Jeroen Bakker (lineart-shadow) December 8, 2021, 06:53 (GMT) |
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 |
Commit Details:
Full Hash: a8581886042ecb899b9079098f91a9ee23f1e66a
Parent Commit: be67838
Committed By: YimingWu
Lines Changed: +23, -0
12 Modified Paths:
/source/blender/draw/engines/basic/basic_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/eevee/eevee_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/external/external_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/image/image_engine.cc (+1, -0) (Diff)
/source/blender/draw/engines/overlay/overlay_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/select/select_debug_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/select/select_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/workbench/workbench_engine.c (+1, -0) (Diff)
/source/blender/draw/intern/draw_view_data.cc (+6, -0) (Diff)
/source/blender/draw/intern/draw_view_data.h (+6, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+2, -0) (Diff)
/source/blender/draw/engines/eevee/eevee_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/external/external_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/image/image_engine.cc (+1, -0) (Diff)
/source/blender/draw/engines/overlay/overlay_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/select/select_debug_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/select/select_engine.c (+1, -0) (Diff)
/source/blender/draw/engines/workbench/workbench_engine.c (+1, -0) (Diff)
/source/blender/draw/intern/draw_view_data.cc (+6, -0) (Diff)
/source/blender/draw/intern/draw_view_data.h (+6, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+2, -0) (Diff)