Fix T77455: Blender Freezes when using the 3d Scale Gizmo

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
This commit is contained in:
Jeroen Bakker 2020-07-06 14:33:59 +02:00
parent abdaf4159f
commit 0f95cc8293
Notes: blender-bot 2023-02-14 05:16:25 +01:00
Referenced by issue #77455, Scale gizmos cause complete freezes in Blender 2.83 on Intel graphics
1 changed files with 2 additions and 1 deletions

View File

@ -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);