diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-29 06:01:01 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-29 06:13:30 +0300 |
commit | 9dadd8bdb101fd5c06cd6ca7aa708a6ce6f13d47 (patch) | |
tree | 160f326ac6f41f369be8c311d251400cc254a80a /source/blender/windowmanager | |
parent | 0b5cf91b8908ad0b3a7ae401bcf74975acb47ded (diff) |
Fix T97124: Area light size gizmo unselectable
Workaround for MS-Windows NVidia/LLVMPipe combination failing to select
the gizmo unless depth-test was used.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 9 |
1 files changed, 9 insertions, 0 deletions
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)) { |