Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620

Seems like a driver bug but doing glFlush() before these calls fixes it.
This commit is contained in:
Clément Foucault 2018-12-02 01:57:22 +01:00
parent 8c620c8e2b
commit 40d0374411
Notes: blender-bot 2023-02-14 05:08:19 +01:00
Referenced by issue #57455, Laggy, freezing UI with Linux and Intel UHD 620
3 changed files with 13 additions and 2 deletions

View File

@ -387,6 +387,12 @@ void ED_screen_draw_edges(wmWindow *win)
BLI_rcti_do_minmax_v(&scissor_rect, (int[2]){sa->v3->vec.x, sa->v3->vec.y});
}
if (GPU_type_matches(GPU_DEVICE_INTEL_UHD, GPU_OS_UNIX, GPU_OS_ANY)) {
/* For some reason, on linux + Intel UHD Graphics 620 the driver
* hangs if we don't flush before this. (See T57455) */
glFlush();
}
GPU_scissor(scissor_rect.xmin,
scissor_rect.ymin,
BLI_rcti_size_x(&scissor_rect) + 1,

View File

@ -66,8 +66,9 @@ typedef enum GPUDeviceType {
GPU_DEVICE_NVIDIA = (1 << 0),
GPU_DEVICE_ATI = (1 << 1),
GPU_DEVICE_INTEL = (1 << 2),
GPU_DEVICE_SOFTWARE = (1 << 3),
GPU_DEVICE_UNKNOWN = (1 << 4),
GPU_DEVICE_INTEL_UHD = (1 << 3),
GPU_DEVICE_SOFTWARE = (1 << 4),
GPU_DEVICE_UNKNOWN = (1 << 5),
GPU_DEVICE_ANY = (0xff)
} GPUDeviceType;

View File

@ -282,6 +282,10 @@ void gpu_extensions_init(void)
{
GG.device = GPU_DEVICE_INTEL;
GG.driver = GPU_DRIVER_OFFICIAL;
if (strstr(renderer, "UHD Graphics")) {
GG.device |= GPU_DEVICE_INTEL_UHD;
}
}
else if ((strstr(renderer, "Mesa DRI R")) ||
(strstr(renderer, "Radeon") && strstr(vendor, "X.Org")) ||