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:
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index e31c2f5cbbd..cde7b283976 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -644,18 +644,7 @@ static void drw_viewport_var_init(void)
}
/* Alloc array of texture reference. */
- if (DST.RST.bound_texs == NULL) {
- DST.RST.bound_texs = MEM_callocN(sizeof(GPUTexture *) * GPU_max_textures(), "Bound GPUTexture refs");
- }
- if (DST.RST.bound_tex_slots == NULL) {
- DST.RST.bound_tex_slots = MEM_callocN(sizeof(char) * GPU_max_textures(), "Bound Texture Slots");
- }
- if (DST.RST.bound_ubos == NULL) {
- DST.RST.bound_ubos = MEM_callocN(sizeof(GPUUniformBuffer *) * GPU_max_ubo_binds(), "Bound GPUUniformBuffer refs");
- }
- if (DST.RST.bound_ubo_slots == NULL) {
- DST.RST.bound_ubo_slots = MEM_callocN(sizeof(char) * GPU_max_ubo_binds(), "Bound Ubo Slots");
- }
+ memset(&DST.RST, 0x0, sizeof(DST.RST));
if (G_draw.view_ubo == NULL) {
G_draw.view_ubo = DRW_uniformbuffer_create(sizeof(ViewUboStorage), NULL);
@@ -2796,11 +2785,6 @@ void DRW_engines_free(void)
DRW_TEXTURE_FREE_SAFE(G_draw.weight_ramp);
MEM_SAFE_FREE(g_pos_format);
- MEM_SAFE_FREE(DST.RST.bound_texs);
- MEM_SAFE_FREE(DST.RST.bound_tex_slots);
- MEM_SAFE_FREE(DST.RST.bound_ubos);
- MEM_SAFE_FREE(DST.RST.bound_ubo_slots);
-
MEM_SAFE_FREE(DST.uniform_names.buffer);
DRW_opengl_context_disable();