[Bf-blender-cvs] [40d0374411e] blender2.8: Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620
Clément Foucault
noreply at git.blender.org
Sun Dec 2 01:57:33 CET 2018
Commit: 40d0374411e28f8d1409303743e71b8b6b8aab2c
Author: Clément Foucault
Date: Sun Dec 2 01:57:22 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB40d0374411e28f8d1409303743e71b8b6b8aab2c
Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620
Seems like a driver bug but doing glFlush() before these calls fixes it.
===================================================================
M source/blender/editors/screen/screen_draw.c
M source/blender/gpu/GPU_extensions.h
M source/blender/gpu/intern/gpu_extensions.c
===================================================================
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index 51301b0f022..0068fe4dcf5 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -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,
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 07d8a5f8c8b..12a640747da 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -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;
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index e6e82b3cc86..99f770b4d03 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -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")) ||
More information about the Bf-blender-cvs
mailing list