[Bf-blender-cvs] [8186b96753e] blender-v2.91-release: Fix use of uninitialized line/polygon smooth variables in GPU state

Brecht Van Lommel noreply at git.blender.org
Fri Oct 23 15:35:07 CEST 2020


Commit: 8186b96753e60a100a8fa58880350367f6fc85b7
Author: Brecht Van Lommel
Date:   Fri Oct 23 15:27:47 2020 +0200
Branches: blender-v2.91-release
https://developer.blender.org/rB8186b96753e60a100a8fa58880350367f6fc85b7

Fix use of uninitialized line/polygon smooth variables in GPU state

Found by valgrind, unclear if this caused an actual bug.

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

M	source/blender/gpu/intern/gpu_state.cc

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

diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index fae196b202a..10c3fabe75d 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -396,6 +396,8 @@ StateManager::StateManager(void)
   state.shadow_bias = false;
   state.polygon_smooth = false;
   state.clip_distances = 0;
+  state.polygon_smooth = 0;
+  state.line_smooth = 0;
 
   mutable_state.depth_range[0] = 0.0f;
   mutable_state.depth_range[1] = 1.0f;



More information about the Bf-blender-cvs mailing list