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:
authorCampbell Barton <ideasman42@gmail.com>2017-04-12 12:49:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-12 12:51:14 +0300
commit0c9a2def8b1e40a0b5a3ed348d1fd92cc13096ff (patch)
tree8749b8080b9b02514cc7f9d08dab6391ce716844 /source/blender/draw/modes/paint_vertex_mode.c
parentb380f4927e30bc2877b4f3a760fefa0dfc3614e1 (diff)
Draw Engine: remove hard coded limit on array sizes
This removes MAX_STORAGE, MAX_BUFFERS, MAX_TEXTURES, MAX_PASSES limits. Actual memory saving isn't so important, it just means we don't need to manually bump these based on changes to engines.
Diffstat (limited to 'source/blender/draw/modes/paint_vertex_mode.c')
-rw-r--r--source/blender/draw/modes/paint_vertex_mode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c
index cd72881357f..61bd376072f 100644
--- a/source/blender/draw/modes/paint_vertex_mode.c
+++ b/source/blender/draw/modes/paint_vertex_mode.c
@@ -46,7 +46,6 @@ extern struct GlobalsUboStorage ts; /* draw_common.c */
* initialize most of them and PAINT_VERTEX_cache_init()
* for PAINT_VERTEX_PassList */
-/* keep it under MAX_PASSES */
typedef struct PAINT_VERTEX_PassList {
/* Declare all passes here and init them in
* PAINT_VERTEX_cache_init().
@@ -54,14 +53,12 @@ typedef struct PAINT_VERTEX_PassList {
struct DRWPass *pass;
} PAINT_VERTEX_PassList;
-/* keep it under MAX_BUFFERS */
typedef struct PAINT_VERTEX_FramebufferList {
/* Contains all framebuffer objects needed by this engine.
* Only contains (GPUFrameBuffer *) */
struct GPUFrameBuffer *fb;
} PAINT_VERTEX_FramebufferList;
-/* keep it under MAX_TEXTURES */
typedef struct PAINT_VERTEX_TextureList {
/* Contains all framebuffer textures / utility textures
* needed by this engine. Only viewport specific textures
@@ -69,7 +66,6 @@ typedef struct PAINT_VERTEX_TextureList {
struct GPUTexture *texture;
} PAINT_VERTEX_TextureList;
-/* keep it under MAX_STORAGE */
typedef struct PAINT_VERTEX_StorageList {
/* Contains any other memory block that the engine needs.
* Only directly MEM_(m/c)allocN'ed blocks because they are
@@ -257,9 +253,12 @@ void PAINT_VERTEX_collection_settings_create(CollectionEngineSettings *ces)
}
#endif
+static const DrawEngineDataSize PAINT_VERTEX_data_size = DRW_VIEWPORT_DATA_SIZE(PAINT_VERTEX_Data);
+
DrawEngineType draw_engine_paint_vertex_type = {
NULL, NULL,
N_("PaintVertexMode"),
+ &PAINT_VERTEX_data_size,
&PAINT_VERTEX_engine_init,
&PAINT_VERTEX_engine_free,
&PAINT_VERTEX_cache_init,