[Bf-blender-cvs] [0ad4d07f10e] master: Fix: Debug build compile error after recent cleanup commit

Hans Goudey noreply at git.blender.org
Mon Jan 23 22:57:45 CET 2023


Commit: 0ad4d07f10e29f5a6678615ebe0453c679856f18
Author: Hans Goudey
Date:   Mon Jan 23 15:57:13 2023 -0600
Branches: master
https://developer.blender.org/rB0ad4d07f10e29f5a6678615ebe0453c679856f18

Fix: Debug build compile error after recent cleanup commit

79ba1a1ac82d854d84 missed that this variable was used in an assert.

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

M	source/blender/draw/engines/workbench/workbench_shadow.cc

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

diff --git a/source/blender/draw/engines/workbench/workbench_shadow.cc b/source/blender/draw/engines/workbench/workbench_shadow.cc
index 533e32662a4..e4a409f1457 100644
--- a/source/blender/draw/engines/workbench/workbench_shadow.cc
+++ b/source/blender/draw/engines/workbench/workbench_shadow.cc
@@ -131,9 +131,12 @@ void ShadowPass::ShadowView::setup(View &view, float3 light_direction, bool forc
       float4 extruded_face = float4(UNPACK3(normal), math::dot(normal, corner_a));
 
       /* Ensure the plane faces outwards */
+      bool flipped = false;
       for (float3 corner : frustum_corners.vec) {
         if (math::dot(float3(extruded_face), corner) > (extruded_face.w + 0.1)) {
           BLI_assert(!flipped);
+          UNUSED_VARS_NDEBUG(flipped);
+          flipped = true;
           extruded_face *= -1;
         }
       }



More information about the Bf-blender-cvs mailing list