diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-10 17:26:55 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-10 17:27:24 +0300 |
commit | edc8a4c4847e3ea3a58683926c22b519d2af830c (patch) | |
tree | b01a9c58c0cc9eb7c692a852aebacfbedbae38f4 /source/blender/gpu | |
parent | 51a60cbaf86020f19de639245cb06e37d6d7c6f2 (diff) |
Fix memory leak when using two bump maps on the same material
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index f8499ca2d34..c754f63664f 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1234,7 +1234,6 @@ static void do_material_tex(GPUShadeInput *shi) float imag_tspace_dimension_x = 1024.0f; // only used for texture space variant float aspect = 1.0f; - GPUNodeLink *surf_pos = GPU_builtin(GPU_VIEW_POSITION); GPUNodeLink *vR1, *vR2; GPUNodeLink *dBs, *dBt, *fDet; @@ -1291,7 +1290,8 @@ static void do_material_tex(GPUShadeInput *shi) // re-initialize if bump space changed if ( iBumpSpacePrev != iBumpSpace ) { - + GPUNodeLink *surf_pos = GPU_builtin(GPU_VIEW_POSITION); + if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) GPU_link(mat, "mtex_bump_init_objspace", surf_pos, vNorg, |