diff options
18 files changed, 68 insertions, 70 deletions
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index 17028e3ac2a..6a81d7d5e51 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -52,7 +52,7 @@ typedef struct BASIC_Storage { typedef struct BASIC_StorageList { struct BASIC_Storage *storage; - struct g_data *g_data; + struct BASIC_PrivateData *g_data; } BASIC_StorageList; typedef struct BASIC_FramebufferList { @@ -80,7 +80,6 @@ typedef struct BASIC_PassList { struct DRWPass *depth_pass_cull; #endif struct DRWPass *color_pass; - struct g_data *g_data; } BASIC_PassList; typedef struct BASIC_Data { @@ -102,13 +101,13 @@ static struct { struct GPUShader *color_sh; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct BASIC_PrivateData { #ifdef USE_DEPTH DRWShadingGroup *depth_shgrp; DRWShadingGroup *depth_shgrp_cull; #endif DRWShadingGroup *color_shgrp; -} g_data; /* Transient data */ +} BASIC_PrivateData; /* Transient data */ /* Functions */ @@ -152,7 +151,7 @@ static void BASIC_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } #ifdef USE_DEPTH diff --git a/source/blender/draw/engines/clay/clay_engine.c b/source/blender/draw/engines/clay/clay_engine.c index d387adb9054..7266df2500d 100644 --- a/source/blender/draw/engines/clay/clay_engine.c +++ b/source/blender/draw/engines/clay/clay_engine.c @@ -76,7 +76,7 @@ typedef struct CLAY_Storage { typedef struct CLAY_StorageList { struct CLAY_Storage *storage; struct GPUUniformBuffer *mat_ubo; - struct g_data *g_data; + struct CLAY_PrivateData *g_data; } CLAY_StorageList; typedef struct CLAY_FramebufferList { @@ -98,7 +98,6 @@ typedef struct CLAY_PassList { struct DRWPass *depth_pass; struct DRWPass *depth_pass_cull; struct DRWPass *clay_pass; - struct g_data *g_data; } CLAY_PassList; typedef struct CLAY_Data { @@ -133,14 +132,14 @@ static struct { int ubo_mat_idxs[MAX_CLAY_MAT]; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct CLAY_PrivateData { DRWShadingGroup *depth_shgrp; DRWShadingGroup *depth_shgrp_select; DRWShadingGroup *depth_shgrp_active; DRWShadingGroup *depth_shgrp_cull; DRWShadingGroup *depth_shgrp_cull_select; DRWShadingGroup *depth_shgrp_cull_active; -} g_data; /* Transient data */ +} CLAY_PrivateData; /* Transient data */ /* Functions */ @@ -541,7 +540,7 @@ static void CLAY_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } /* Depth Pass */ diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index 6868a2be36c..6fa99b37ced 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -351,7 +351,7 @@ static void EEVEE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 02dc32ddd9a..ee8e8598725 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -89,7 +89,7 @@ typedef struct EEVEE_StorageList { struct EEVEE_ProbesInfo *probes; struct GPUUniformBuffer *probe_ubo; - struct g_data *g_data; + struct EEVEE_PrivateData *g_data; } EEVEE_StorageList; /* ************ LIGHT UBO ************* */ @@ -173,7 +173,7 @@ typedef struct EEVEE_LampEngineData { void *pad; } EEVEE_LampEngineData; -typedef struct g_data{ +typedef struct EEVEE_PrivateData { struct DRWShadingGroup *default_lit_grp; struct DRWShadingGroup *material_lit_grp; struct DRWShadingGroup *shadow_shgrp; @@ -181,7 +181,7 @@ typedef struct g_data{ struct DRWShadingGroup *depth_shgrp_cull; struct ListBase lamps; /* Lamps gathered during cache iteration */ -} g_data; /* Transient data */ +} EEVEE_PrivateData; /* Transient data */ /* eevee_lights.c */ void EEVEE_lights_init(EEVEE_StorageList *stl); diff --git a/source/blender/draw/modes/edit_armature_mode.c b/source/blender/draw/modes/edit_armature_mode.c index 68e3112f03b..19b8262a74e 100644 --- a/source/blender/draw/modes/edit_armature_mode.c +++ b/source/blender/draw/modes/edit_armature_mode.c @@ -42,7 +42,7 @@ typedef struct EDIT_ARMATURE_PassList { } EDIT_ARMATURE_PassList; typedef struct EDIT_ARMATURE_StorageList { - struct g_data *g_data; + struct EDIT_ARMATURE_PrivateData *g_data; } EDIT_ARMATURE_StorageList; typedef struct EDIT_ARMATURE_Data { @@ -55,9 +55,9 @@ typedef struct EDIT_ARMATURE_Data { /* *********** STATIC *********** */ -typedef struct g_data { +typedef struct EDIT_ARMATURE_PrivateData { DRWShadingGroup *relationship_lines; -} g_data; /* Transient data */ +} EDIT_ARMATURE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -68,7 +68,7 @@ static void EDIT_ARMATURE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index f2834bfb0ec..7cdaf7c50e6 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -85,7 +85,7 @@ typedef struct EDIT_CURVE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct EDIT_CURVE_PrivateData *g_data; } EDIT_CURVE_StorageList; typedef struct EDIT_CURVE_Data { @@ -114,7 +114,7 @@ static struct { } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_CURVE_PrivateData { /* This keeps the references of the shading groups for * easy access in EDIT_CURVE_cache_populate() */ @@ -123,7 +123,7 @@ typedef struct g_data { DRWShadingGroup *overlay_edge_shgrp; DRWShadingGroup *overlay_vert_shgrp; -} g_data; /* Transient data */ +} EDIT_CURVE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -178,7 +178,7 @@ static void EDIT_CURVE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_lattice_mode.c b/source/blender/draw/modes/edit_lattice_mode.c index 61c01fb3f48..32411ea470d 100644 --- a/source/blender/draw/modes/edit_lattice_mode.c +++ b/source/blender/draw/modes/edit_lattice_mode.c @@ -81,7 +81,7 @@ typedef struct EDIT_LATTICE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct EDIT_LATTICE_PrivateData *g_data; } EDIT_LATTICE_StorageList; typedef struct EDIT_LATTICE_Data { @@ -108,12 +108,12 @@ static struct { } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_LATTICE_PrivateData { /* This keeps the references of the shading groups for * easy access in EDIT_LATTICE_cache_populate() */ DRWShadingGroup *wire_shgrp; DRWShadingGroup *vert_shgrp; -} g_data; /* Transient data */ +} EDIT_LATTICE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -164,7 +164,7 @@ static void EDIT_LATTICE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 9fe9eef0682..4b5c9009b72 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -73,7 +73,7 @@ typedef struct EDIT_MESH_TextureList { } EDIT_MESH_TextureList; typedef struct EDIT_MESH_StorageList { - struct g_data *g_data; + struct EDIT_MESH_PrivateData *g_data; } EDIT_MESH_StorageList; typedef struct EDIT_MESH_Data { @@ -102,7 +102,7 @@ static struct { GPUShader *depth_sh; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_MESH_PrivateData { DRWShadingGroup *depth_shgrp_hidden_wire; DRWShadingGroup *fnormals_shgrp; @@ -120,7 +120,7 @@ typedef struct g_data { DRWShadingGroup *facedot_occluded_shgrp; DRWShadingGroup *facefill_occluded_shgrp; -} g_data; /* Transient data */ +} EDIT_MESH_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -298,7 +298,7 @@ static void EDIT_MESH_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_metaball_mode.c b/source/blender/draw/modes/edit_metaball_mode.c index b432d610d1b..3bf26ae7adf 100644 --- a/source/blender/draw/modes/edit_metaball_mode.c +++ b/source/blender/draw/modes/edit_metaball_mode.c @@ -72,7 +72,7 @@ typedef struct EDIT_METABALL_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct EDIT_METABALL_PrivateData *g_data; } EDIT_METABALL_StorageList; typedef struct EDIT_METABALL_Data { @@ -96,11 +96,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_METABALL_PrivateData { /* This keeps the references of the shading groups for * easy access in EDIT_METABALL_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} EDIT_METABALL_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -144,7 +144,7 @@ static void EDIT_METABALL_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_surface_mode.c b/source/blender/draw/modes/edit_surface_mode.c index de2e7c94045..0e1049b7a10 100644 --- a/source/blender/draw/modes/edit_surface_mode.c +++ b/source/blender/draw/modes/edit_surface_mode.c @@ -72,7 +72,7 @@ typedef struct EDIT_SURFACE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct EDIT_SURFACE_PrivateData *g_data; } EDIT_SURFACE_StorageList; typedef struct EDIT_SURFACE_Data { @@ -96,11 +96,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_SURFACE_PrivateData { /* This keeps the references of the shading groups for * easy access in EDIT_SURFACE_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} EDIT_SURFACE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -144,7 +144,7 @@ static void EDIT_SURFACE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/edit_text_mode.c b/source/blender/draw/modes/edit_text_mode.c index 0d4326c2e24..03da9ebbb94 100644 --- a/source/blender/draw/modes/edit_text_mode.c +++ b/source/blender/draw/modes/edit_text_mode.c @@ -79,7 +79,7 @@ typedef struct EDIT_TEXT_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct EDIT_TEXT_PrivateData *g_data; } EDIT_TEXT_StorageList; typedef struct EDIT_TEXT_Data { @@ -105,12 +105,12 @@ static struct { GPUShader *overlay_cursor_sh; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct EDIT_TEXT_PrivateData { /* resulting curve as 'wire' for fast editmode drawing */ DRWShadingGroup *wire_shgrp; DRWShadingGroup *overlay_select_shgrp; DRWShadingGroup *overlay_cursor_shgrp; -} g_data; /* Transient data */ +} EDIT_TEXT_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -162,7 +162,7 @@ static void EDIT_TEXT_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 2b42a82cf49..70f8e734b99 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -90,7 +90,7 @@ typedef struct OBJECT_TextureList { } OBJECT_TextureList; typedef struct OBJECT_StorageList { - struct g_data *g_data; + struct OBJECT_PrivateData *g_data; } OBJECT_StorageList; typedef struct OBJECT_Data { @@ -103,7 +103,7 @@ typedef struct OBJECT_Data { /* *********** STATIC *********** */ -typedef struct g_data{ +typedef struct OBJECT_PrivateData{ /* Empties */ DRWShadingGroup *plain_axes; DRWShadingGroup *cube; @@ -179,7 +179,7 @@ typedef struct g_data{ DRWShadingGroup *wire_select_group; DRWShadingGroup *wire_transform; -} g_data; /* Transient data */ +} OBJECT_PrivateData; /* Transient data */ static struct { GPUShader *outline_resolve_sh; @@ -454,7 +454,7 @@ static void OBJECT_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c index 4bd2d27a747..39c0b495fd5 100644 --- a/source/blender/draw/modes/paint_texture_mode.c +++ b/source/blender/draw/modes/paint_texture_mode.c @@ -72,7 +72,7 @@ typedef struct PAINT_TEXTURE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct PAINT_TEXTURE_PrivateData *g_data; } PAINT_TEXTURE_StorageList; typedef struct PAINT_TEXTURE_Data { @@ -96,11 +96,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct PAINT_TEXTURE_PrivateData { /* This keeps the references of the shading groups for * easy access in PAINT_TEXTURE_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} PAINT_TEXTURE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -144,7 +144,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index ff6eeb3068e..f0efe3d82fe 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -72,7 +72,7 @@ typedef struct PAINT_VERTEX_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct PAINT_VERTEX_PrivateData *g_data; } PAINT_VERTEX_StorageList; typedef struct PAINT_VERTEX_Data { @@ -96,11 +96,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct PAINT_VERTEX_PrivateData { /* This keeps the references of the shading groups for * easy access in PAINT_VERTEX_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} PAINT_VERTEX_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -144,7 +144,7 @@ static void PAINT_VERTEX_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c index 0eb42cb51d5..fe5fdf9ba91 100644 --- a/source/blender/draw/modes/paint_weight_mode.c +++ b/source/blender/draw/modes/paint_weight_mode.c @@ -72,7 +72,7 @@ typedef struct PAINT_WEIGHT_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct PAINT_WEIGHT_PrivateData *g_data; } PAINT_WEIGHT_StorageList; typedef struct PAINT_WEIGHT_Data { @@ -96,11 +96,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct PAINT_WEIGHT_PrivateData { /* This keeps the references of the shading groups for * easy access in PAINT_WEIGHT_cache_populate() */ DRWShadingGroup *group; -} g_data; +} PAINT_WEIGHT_PrivateData; /* *********** FUNCTIONS *********** */ @@ -144,7 +144,7 @@ static void PAINT_WEIGHT_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/particle_mode.c b/source/blender/draw/modes/particle_mode.c index 8b87636a62e..f1ec8a2ec75 100644 --- a/source/blender/draw/modes/particle_mode.c +++ b/source/blender/draw/modes/particle_mode.c @@ -66,7 +66,7 @@ typedef struct PARTICLE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct PARTICLE_PrivateData *g_data; } PARTICLE_StorageList; typedef struct PARTICLE_Data { @@ -90,11 +90,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct PARTICLE_PrivateData { /* This keeps the references of the shading groups for * easy access in PARTICLE_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} PARTICLE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -138,7 +138,7 @@ static void PARTICLE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index 2663ac4e579..1eb9fcb6a11 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -66,7 +66,7 @@ typedef struct POSE_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct POSE_PrivateData *g_data; } POSE_StorageList; typedef struct POSE_Data { @@ -90,11 +90,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct POSE_PrivateData { /* This keeps the references of the shading groups for * easy access in POSE_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} POSE_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -138,7 +138,7 @@ static void POSE_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { diff --git a/source/blender/draw/modes/sculpt_mode.c b/source/blender/draw/modes/sculpt_mode.c index cb566121322..015baf2a317 100644 --- a/source/blender/draw/modes/sculpt_mode.c +++ b/source/blender/draw/modes/sculpt_mode.c @@ -66,7 +66,7 @@ typedef struct SCULPT_StorageList { * free with MEM_freeN() when viewport is freed. * (not per object) */ struct CustomStruct *block; - struct g_data *g_data; + struct SCULPT_PrivateData *g_data; } SCULPT_StorageList; typedef struct SCULPT_Data { @@ -90,11 +90,11 @@ static struct { struct GPUShader *custom_shader; } e_data = {NULL}; /* Engine data */ -typedef struct g_data { +typedef struct SCULPT_PrivateData { /* This keeps the references of the shading groups for * easy access in SCULPT_cache_populate() */ DRWShadingGroup *group; -} g_data; /* Transient data */ +} SCULPT_PrivateData; /* Transient data */ /* *********** FUNCTIONS *********** */ @@ -138,7 +138,7 @@ static void SCULPT_cache_init(void *vedata) if (!stl->g_data) { /* Alloc transient pointers */ - stl->g_data = MEM_mallocN(sizeof(g_data), "g_data"); + stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__); } { |