Page MenuHome

GPU: Inform Users on GPU Driver Support level
Closed, ResolvedPublic

Description

Many GPU issues can be related to driver issues. It is not clear to users that their OS/HW/Driver combination has issues and needs to be updated.
This task will detect the combination and the support level we give.

There are 3 support level

  • Fully supported: the combination is known to be working.
  • Limited support: the combination can work, but might have some issues.
  • Unsupported: the combination is known not to work with Blender.

A popup will be shown to the user (using a OS Message/Dialog Box) about the support level and a link to a docs.blender.org page describing what can be done to get better support.

Question:
An unknown driver combination should by default get a fully supported stamp. This might lead to future driver releases to not work correctly, and needs a new blender release for us to update the blacklisting.
IMO this seems to be the best solution, as there are more driver releases then blender releases and gives a more friendly interaction with blender.

Impact:
windowmanager/wm_platform_support

  • add a callback function that will is passed to the GHOST context creation. This function will return a text and link that will be displayed in an OS specific message box. The needs to be added to the GHOST_CreateOpenGLContext. When Blender is running in background the callback should never display any message box, but display the message in the console.
  • add a parameter or logic to WM_opengl_context_create to detect if it is creating it for the main window. If it is it should pass the callback function to GHOST_CreateOpenGLContext otherwise NULL.

GHOST

  • GHOST_CreateOpenGLContext add callback function for support level.
  • add a message box/dialog box per OS. Text + Help button that opens an url to a support page

docs.blender.org

  • Add page how to update your driver. These pages will be per os/gpu vendor. Something like https://docs.blender.org/manual/en/latest/troubleshooting/gpu/windows/intel.html

Event Timeline

Jeroen Bakker (jbakker) lowered the priority of this task from Needs Triage by Developer to Confirmed, High.Oct 1 2019, 11:58 AM
Jeroen Bakker (jbakker) created this task.

The link should go to docs.blender.org instead of wiki.blender.org, since this is user documentation and not developer documentation.

We can indeed detect the OS and graphics card vendor, and send the user to a specific page like docs.blender.org/manual/en/latest/troubleshooting/gpu/windows/intel.html.

An unknown driver combination should by default get a fully supported stamp. This might lead to future driver releases to not work correctly, and needs a new blender release for us to update the blacklisting.
IMO this seems to be the best solution, as there are more driver releases then blender releases and gives a more friendly interaction with blender.

Agree, we should do blacklisting, not whitelisting.

@LazyDodo (LazyDodo) added a diff on showing system warnings/errors in GHOST.

Keep the patch here for reference

1diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
2index 20bb144a924..96c2017c697 100644
3--- a/intern/ghost/GHOST_C-api.h
4+++ b/intern/ghost/GHOST_C-api.h
5@@ -949,6 +949,22 @@ extern void GHOST_BeginIME(GHOST_WindowHandle windowhandle,
6 */
7 extern void GHOST_EndIME(GHOST_WindowHandle windowhandle);
8
9+/**
10+ * Display a warning with OS Native messaging
11+ * \param systemhandle The handle to the system
12+ * \param title caption for the warning
13+ * \param text text body for the warning
14+ */
15+extern void GHOST_Warning(GHOST_SystemHandle systemhandle, const char *title, const char *text);
16+
17+/**
18+ * Display an error with OS Native messaging
19+ * \param systemhandle The handle to the system
20+ * \param title caption for the error
21+ * \param text text body for the error
22+ */
23+extern void GHOST_Error(GHOST_SystemHandle systemhandle, const char *title, const char *text);
24+
25 #ifdef __cplusplus
26 }
27 #endif
28diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
29index 27be80a2f20..0d793888eaa 100644
30--- a/intern/ghost/GHOST_ISystem.h
31+++ b/intern/ghost/GHOST_ISystem.h
32@@ -435,6 +435,20 @@ class GHOST_ISystem {
33 */
34 virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
35
36+ /**
37+ * Display a warning with OS Native messaging
38+ * \param title caption for the warning
39+ * \param text text body for the warning
40+ */
41+ virtual void warning(const STR_String &title, const STR_String &text) const = 0;
42+
43+ /**
44+ * Display a error with OS Native messaging
45+ * \param title caption for the warning
46+ * \param text text body for the warning
47+ */
48+ virtual void error(const STR_String &title, const STR_String &text) const = 0;
49+
50 protected:
51 /**
52 * Initialize the system.
53diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
54index a1a209af77a..c2b94038247 100644
55--- a/intern/ghost/intern/GHOST_C-api.cpp
56+++ b/intern/ghost/intern/GHOST_C-api.cpp
57@@ -838,3 +838,15 @@ void GHOST_EndIME(GHOST_WindowHandle windowhandle)
58 }
59
60 #endif /* WITH_INPUT_IME */
61+
62+void GHOST_Warning(GHOST_SystemHandle systemhandle, const char *title, const char *text)
63+{
64+ GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
65+ system->warning(title, text);
66+}
67+
68+void GHOST_Error(GHOST_SystemHandle systemhandle, const char *title, const char *text)
69+{
70+ GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
71+ system->error(title, text);
72+}
73\ No newline at end of file
74diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
75index fbf8af01e59..46bfe35f6b1 100644
76--- a/intern/ghost/intern/GHOST_System.h
77+++ b/intern/ghost/intern/GHOST_System.h
78@@ -40,6 +40,7 @@ class GHOST_Event;
79 class GHOST_TimerManager;
80 class GHOST_Window;
81 class GHOST_WindowManager;
82+class STR_String;
83 #ifdef WITH_INPUT_NDOF
84 class GHOST_NDOFManager;
85 #endif
86@@ -317,6 +318,20 @@ class GHOST_System : public GHOST_ISystem {
87 */
88 virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
89
90+ /**
91+ * Display a warning with OS Native messaging
92+ * \param title caption for the warning
93+ * \param text text body for the warning
94+ */
95+ virtual void warning(const STR_String &title, const STR_String &text) const = 0;
96+
97+ /**
98+ * Display a error with OS Native messaging
99+ * \param title caption for the warning
100+ * \param text text body for the warning
101+ */
102+ virtual void error(const STR_String &title, const STR_String &text) const = 0;
103+
104 protected:
105 /**
106 * Initialize the system.
107diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
108index 9073ed9944b..59aee00f2e1 100644
109--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
110+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
111@@ -356,12 +356,10 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
112 goto finished;
113 }
114 else {
115- MessageBox(NULL,
116- "A graphics card and driver with support for OpenGL 3.3 or higher is required.\n"
117- "Installing the latest driver for your graphics card may resolve the issue.\n\n"
118- "The program will now close.",
119- "Blender - Unsupported Graphics Card or Driver",
120- MB_OK | MB_ICONERROR);
121+ error("Blender - Unsupported Graphics Card or Driver",
122+ "A graphics card and driver with support for OpenGL 3.3 or higher is required.\n"
123+ "Installing the latest driver for your graphics card may resolve the issue.\n\n"
124+ "The program will now close.");
125 delete context;
126 exit();
127 }
128@@ -1871,3 +1869,11 @@ int GHOST_SystemWin32::toggleConsole(int action)
129
130 return m_consoleStatus;
131 }
132+
133+void GHOST_SystemWin32::warning(const STR_String &title, const STR_String &text) const
134+{
135+}
136+
137+void GHOST_SystemWin32::error(const STR_String &title, const STR_String &text) const
138+{
139+}
140diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
141index 7ac6a3e3e20..b2d4a86a86f 100644
142--- a/intern/ghost/intern/GHOST_SystemWin32.h
143+++ b/intern/ghost/intern/GHOST_SystemWin32.h
144@@ -203,6 +203,20 @@ class GHOST_SystemWin32 : public GHOST_System {
145 */
146 void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
147
148+ /**
149+ * Display a warning with OS Native messaging
150+ * \param title caption for the warning
151+ * \param text text body for the warning
152+ */
153+ void warning(const STR_String &title, const STR_String &text) const;
154+
155+ /**
156+ * Display a error with OS Native messaging
157+ * \param title caption for the warning
158+ * \param text text body for the warning
159+ */
160+ void error(const STR_String &title, const STR_String &text) const;
161+
162 /**
163 * Creates a drag'n'drop event and pushes it immediately onto the event queue.
164 * Called by GHOST_DropTargetWin32 class.
165diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
166index 568b904dcb7..544157df81a 100644
167--- a/source/blender/windowmanager/WM_api.h
168+++ b/source/blender/windowmanager/WM_api.h
169@@ -818,6 +818,9 @@ void WM_generic_callback_free(struct wmGenericCallback *callback);
170
171 void WM_generic_user_data_free(struct wmGenericUserData *user_data);
172
173+void WM_system_warning(const char *title, const char *text);
174+void WM_system_error(const char *title, const char *text);
175+
176 #ifdef __cplusplus
177 }
178 #endif
179diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
180index 2c26a15dce0..52bc65c8354 100644
181--- a/source/blender/windowmanager/intern/wm_window.c
182+++ b/source/blender/windowmanager/intern/wm_window.c
183@@ -2394,4 +2394,14 @@ void WM_opengl_context_release(void *context)
184 GHOST_ReleaseOpenGLContext((GHOST_ContextHandle)context);
185 }
186
187+void WM_system_warning(const char *title, const char *text)
188+{
189+ GHOST_Warning(g_system, title, text);
190+}
191+
192+void WM_system_error(const char *title, const char *text)
193+{
194+ GHOST_Error(g_system, title, text);
195+}
196+
197 /** \} */

Blacklisting is fine but don't give an "everything's great" message by default. It's ok to say "This GPU/driver combination's support level is unknown".