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:
authorClément Foucault <foucault.clem@gmail.com>2020-08-18 14:52:20 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 14:53:07 +0300
commitfe1827df821cdba2d66b03c0f3366e8df3c2fe76 (patch)
treee4dd8cca6d3664c6c8174ce7c3fbee5a4fff0358 /source/blender/gpu/opengl
parent4814836120e50cce4a23e037a9bbb6a1e53de890 (diff)
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.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r--source/blender/gpu/opengl/gl_drawlist.cc2
1 files changed, 2 insertions, 0 deletions
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;
}
/** \} */