diff options
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 6 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.h | 1 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index aec94f9f2cb..c40bc8eaf27 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1732,3 +1732,9 @@ void GPU_pass_free(GPUPass *pass) MEM_freeN(pass->vertexcode); MEM_freeN(pass); } + +void GPU_pass_free_nodes(ListBase *nodes) +{ + gpu_nodes_free(nodes); +} + diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 417e46a83ee..7af17f9122d 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -183,6 +183,7 @@ void GPU_pass_update_uniforms(GPUPass *pass); void GPU_pass_unbind(GPUPass *pass); void GPU_pass_free(GPUPass *pass); +void GPU_pass_free_nodes(ListBase *nodes); void gpu_codegen_init(void); void gpu_codegen_exit(void); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 4775d2ed30a..ed9718f1a17 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -270,6 +270,9 @@ static int GPU_material_construct_end(GPUMaterial *material, const char *passnam material->partangvel = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_PARTICLE_ANG_VELOCITY)); return 1; } + else { + GPU_pass_free_nodes(&material->nodes); + } return 0; } |