Fix #132196: UI: Camera gizmo cannot be shifted on Intel GPUs
GPU_DEPTH_NONE leads to issues with Intel GPU drivers on Windows where camera gizmos cannot be shifted. glGetQueryObjectuiv for GL_SAMPLES_PASSED seems to return zero in all cases. This might be due to undefined behavior of OpenGL when the depth test is disabled and rendering to a depth render target-only framebuffer. Using GPU_DEPTH_ALWAYS fixes the issue. Pull Request: https://projects.blender.org/blender/blender/pulls/136607
This commit is contained in:
committed by
Clément Foucault
parent
e2d58e33a0
commit
056fa85699
@@ -535,7 +535,12 @@ static void gizmo_draw_select_3d_loop(const bContext *C,
|
||||
GPU_depth_test(GPU_DEPTH_LESS_EQUAL);
|
||||
}
|
||||
else {
|
||||
GPU_depth_test(GPU_DEPTH_NONE);
|
||||
/* WORKAROUND(#132196): `GPU_DEPTH_NONE` leads to issues with Intel GPU drivers on Windows
|
||||
* where camera gizmos cannot be shifted. `glGetQueryObjectuiv` for `GL_SAMPLES_PASSED`
|
||||
* seems to return zero in all cases. This might be due to undefined behavior of OpenGL
|
||||
* when the depth test is disabled and rendering to a depth render target-only framebuffer.
|
||||
* Using `GPU_DEPTH_ALWAYS` fixes the issue. */
|
||||
GPU_depth_test(GPU_DEPTH_ALWAYS);
|
||||
}
|
||||
is_depth_prev = is_depth;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user