Fix T97124: Area light size gizmo unselectable
Workaround for MS-Windows NVidia/LLVMPipe combination failing to select the gizmo unless depth-test was used.
This commit is contained in:
parent
0b5cf91b89
commit
9dadd8bdb1
Notes:
blender-bot
2023-02-14 00:44:02 +01:00
Referenced by issue #97771, Regression: light gizmos not working (Windows + NVidia) Referenced by issue #97124, Regression: Area lights. Size manipulators lost (WIN+NVidia)
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue