[Bf-blender-cvs] [fe1827df821] master: Fix T79782 GPU: Crash cause by shadow batch reference

Clément Foucault noreply at git.blender.org
Tue Aug 18 13:53:10 CEST 2020


Commit: fe1827df821cdba2d66b03c0f3366e8df3c2fe76
Author: Clément Foucault
Date:   Tue Aug 18 13:52:20 2020 +0200
Branches: master
https://developer.blender.org/rBfe1827df821cdba2d66b03c0f3366e8df3c2fe76

Fix T79782 GPU: Crash cause by shadow batch reference

After drawing, the batch could be reset and draw again using other
parameters.

Avoid having to track references by setting the batch pointer to NULL after
drawing.

===================================================================

M	source/blender/gpu/opengl/gl_drawlist.cc

===================================================================

diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc
index 575b2c989e4..b02681af892 100644
--- a/source/blender/gpu/opengl/gl_drawlist.cc
+++ b/source/blender/gpu/opengl/gl_drawlist.cc
@@ -235,6 +235,8 @@ void GLDrawList::submit(void)
   }
   /* Do not submit this buffer again. */
   command_len_ = 0;
+  /* Avoid keeping reference to the batch. */
+  batch_ = NULL;
 }
 
 /** \} */



More information about the Bf-blender-cvs mailing list