wgl: do not disable error-dialogs by default

We don't know if an application developer wants error-dialog by default
or not, even when using a Mesa OpenGL driver.

So let's not assume this is a good thing, and instead make an option for
this behavior that we can enable for CI testing.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15485>
This commit is contained in:
Erik Faye-Lund 2022-03-21 11:49:27 +01:00 committed by Marge Bot
parent ae73a26355
commit 82ca8a707e
3 changed files with 7 additions and 1 deletions

View File

@ -235,6 +235,9 @@ on Windows.
:envvar:`WGL_FORCE_MSAA`
if set to a positive value, specifies the number of MSAA samples to
force when choosing the display configuration.
:envvar:`WGL_DISABLE_ERROR_DIALOGS`
if set to 1, true or yes, disables Win32 error dialogs. Useful for
automated test-runs.
Intel driver environment variables
----------------------------------------------------

View File

@ -12,6 +12,7 @@
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
GALLIUM_DRIVER: d3d12
WGL_DISABLE_ERROR_DIALOGS: "true"
.d3d12-test-piglit:
extends:

View File

@ -28,6 +28,7 @@
#include <windows.h>
#include "glapi/glapi.h"
#include "util/debug.h"
#include "util/u_debug.h"
#include "util/u_math.h"
#include "util/u_memory.h"
@ -120,7 +121,8 @@ stw_init(const struct stw_winsys *stw_winsys)
{
static struct stw_device stw_dev_storage;
debug_disable_win32_error_dialogs();
if (env_var_as_boolean("WGL_DISABLE_ERROR_DIALOGS", false))
debug_disable_win32_error_dialogs();
assert(!stw_dev);