Cleanup: DRW: Remove DRW_pass_free
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user