diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/DRW_engine.h | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 18 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 6 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 8 |
4 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h index da1f5c7863a..cb75a965ef7 100644 --- a/source/blender/draw/DRW_engine.h +++ b/source/blender/draw/DRW_engine.h @@ -146,7 +146,6 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph void DRW_gpencil_freecache(struct Object *ob); /* This is here because GPUViewport needs it */ -void DRW_pass_free(struct DRWPass *pass); struct DRWInstanceDataList *DRW_instance_data_list_create(void); void DRW_instance_data_list_free(struct DRWInstanceDataList *idatalist); diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 93a23643c36..a1f9bb6713c 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -220,10 +220,10 @@ struct DRWShadingGroup { /* Watch this! Can be nasty for debugging. */ union { struct { /* DRW_SHG_NORMAL */ - DRWCall *first, *last; /* Linked list of DRWCall or DRWCallDynamic depending of type */ + DRWCall *first, *last; /* Linked list of DRWCall */ } calls; - struct { /* DRW_SHG_FEEDBACK_TRANSFORM */ - DRWCall *first, *last; /* Linked list of DRWCall or DRWCallDynamic depending of type */ + struct { /* DRW_SHG_FEEDBACK_TRANSFORM */ + DRWCall *first, *last; /* Linked list of DRWCall. */ struct GPUVertBuf *tfeedback_target; /* Transform Feedback target. */ }; struct { /* DRW_SHG_***_BATCH */ @@ -281,6 +281,18 @@ struct DRWPass { char name[MAX_PASS_NAME]; }; +/* TODO(fclem): Future awaits */ +#if 0 +typedef struct DRWView { + /* Culling function, culling result etc...*/ +} DRWView; + +typedef struct ModelUboStorage { + float model[4][4]; + float modelinverse[4][4]; +} ModelUboStorage; +#endif + typedef struct ViewUboStorage { DRWMatrixState matstate; float viewcamtexcofac[4]; diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 13ab4749319..e1f9f826ca5 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -1316,12 +1316,6 @@ void DRW_pass_state_remove(DRWPass *pass, DRWState state) pass->state &= ~state; } -void DRW_pass_free(DRWPass *pass) -{ - pass->shgroups.first = NULL; - pass->shgroups.last = NULL; -} - void DRW_pass_foreach_shgroup(DRWPass *pass, void (*callback)(void *userData, DRWShadingGroup *shgrp), void *userData) diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index db083244b01..9b53f623746 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -601,13 +601,7 @@ static void gpu_viewport_storage_free(StorageList *stl, int stl_len) static void gpu_viewport_passes_free(PassList *psl, int psl_len) { - for (int i = 0; i < psl_len; i++) { - struct DRWPass *pass = psl->passes[i]; - if (pass) { - DRW_pass_free(pass); - psl->passes[i] = NULL; - } - } + memset(psl, 0, sizeof(struct DRWPass *) * psl_len); } /* Must be executed inside Drawmanager Opengl Context. */ |