Blender Git Loki

Git Commits -> Revision b069218

Revision b069218 by Jeroen Bakker (master)
December 7, 2021, 09:34 (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: b069218a5563662b08b3057c96e5e0be877c16ca
Parent Commit: e2f0b4a
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021