Mesa (main): wgl: do not disable error-dialogs by default
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 13:50:17 UTC 2022
Module: Mesa
Branch: main
Commit: 82ca8a707eba4aa0955fc682efec3dd28ed8fb6b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=82ca8a707eba4aa0955fc682efec3dd28ed8fb6b
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Mar 21 11:49:27 2022 +0100
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 at collabora.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15485>
---
docs/envvars.rst | 3 +++
src/gallium/drivers/d3d12/ci/gitlab-ci.yml | 1 +
src/gallium/frontends/wgl/stw_device.c | 4 +++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/docs/envvars.rst b/docs/envvars.rst
index 39aea445b13..9ad6932fd17 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -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
----------------------------------------------------
diff --git a/src/gallium/drivers/d3d12/ci/gitlab-ci.yml b/src/gallium/drivers/d3d12/ci/gitlab-ci.yml
index 4a93cb20972..52b5bfdf0f9 100644
--- a/src/gallium/drivers/d3d12/ci/gitlab-ci.yml
+++ b/src/gallium/drivers/d3d12/ci/gitlab-ci.yml
@@ -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:
diff --git a/src/gallium/frontends/wgl/stw_device.c b/src/gallium/frontends/wgl/stw_device.c
index 0ef057bce2f..8d3b7951f3a 100644
--- a/src/gallium/frontends/wgl/stw_device.c
+++ b/src/gallium/frontends/wgl/stw_device.c
@@ -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);
More information about the mesa-commit
mailing list