From 202e7ccaaee8909f72465f67ab59626fa6dd3a48 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 6 Jul 2020 14:33:59 +0200 Subject: Fix T77455: Blender Freezes when using the 3d Scale Gizmo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue is reported on Linux ith Intel HD6xx iGPU. Inside `gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After bisecting this lead to the polyline shader. When using a 3d color shader in stead of the polyline shader during selection seems to fix the issue. Other parts of blender might also be effective, but I wasn't able to freeze blender in these areas. When it does, we might want to add a similar work-around to button2d, cage2d, cage3d & move3d, navigate. Backport this patch to 2.83. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8217 --- source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/gizmo_library') diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c index e6333d7d3e0..f31e004264c 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c @@ -88,7 +88,8 @@ static void arrow_draw_geom(const ArrowGizmo3D *arrow, const bool select, const const int draw_style = RNA_enum_get(arrow->gizmo.ptr, "draw_style"); const int draw_options = RNA_enum_get(arrow->gizmo.ptr, "draw_options"); - immBindBuiltinProgram(GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR); + immBindBuiltinProgram(select ? GPU_SHADER_3D_UNIFORM_COLOR : + GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR); float viewport[4]; GPU_viewport_size_get_f(viewport); -- cgit v1.2.3