[Bf-blender-cvs] [9dadd8bdb10] master: Fix T97124: Area light size gizmo unselectable

Campbell Barton noreply at git.blender.org
Fri Apr 29 05:14:27 CEST 2022


Commit: 9dadd8bdb101fd5c06cd6ca7aa708a6ce6f13d47
Author: Campbell Barton
Date:   Fri Apr 29 13:01:01 2022 +1000
Branches: master
https://developer.blender.org/rB9dadd8bdb101fd5c06cd6ca7aa708a6ce6f13d47

Fix T97124: Area light size gizmo unselectable

Workaround for MS-Windows NVidia/LLVMPipe combination failing to select
the gizmo unless depth-test was used.

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

M	source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c

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

diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index d9f4050c8f1..290912f1c97 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -24,6 +24,7 @@
 
 #include "GPU_framebuffer.h"
 #include "GPU_matrix.h"
+#include "GPU_platform.h"
 #include "GPU_select.h"
 #include "GPU_state.h"
 #include "GPU_viewport.h"
@@ -754,6 +755,14 @@ static wmGizmo *gizmo_find_intersected_3d(bContext *C,
     bool use_depth_test = false;
     bool use_depth_cache = false;
 
+    /* Workaround for MS-Windows & NVidia failing to detect any gizmo undo the cursor unless the
+     * depth test is enabled, see: T97124.
+     * NOTE(@campbellbarton): Ideally the exact cause of this could be tracked down,
+     * disable as I don't have a system to test this configuration. */
+    if (GPU_type_matches(GPU_DEVICE_NVIDIA | GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_ANY)) {
+      use_depth_test = true;
+    }
+
     for (int i = 0; i < ARRAY_SIZE(hotspot_radii); i++) {
 
       if (use_depth_test && (use_depth_cache == false)) {



More information about the Bf-blender-cvs mailing list