Mesa (main): wgl: rename force-msaa env-var
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 13:50:17 UTC 2022
Module: Mesa
Branch: main
Commit: 116553b554f501846241c9d8d1dc6e43010c85a6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=116553b554f501846241c9d8d1dc6e43010c85a6
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Mar 21 11:09:51 2022 +0100
wgl: rename force-msaa env-var
This env-var is not specific to the SVGA driver, so we should rename it
for consistency.
While we're at it, let's document the feature.
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 | 10 ++++++++++
src/gallium/frontends/wgl/stw_pixelformat.c | 12 +++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/docs/envvars.rst b/docs/envvars.rst
index b8f5efb915a..39aea445b13 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -226,6 +226,16 @@ the :doc:`Xlib software driver page <xlibdriver>` for details.
:envvar:`MESA_GLX_ALPHA_BITS`
specifies default number of bits for alpha channel.
+Mesa WGL driver environment variables
+-------------------------------------
+
+The following are only applicable to the Mesa WGL driver, which is in use
+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.
+
Intel driver environment variables
----------------------------------------------------
diff --git a/src/gallium/frontends/wgl/stw_pixelformat.c b/src/gallium/frontends/wgl/stw_pixelformat.c
index 5eabd24b42d..3994ab0766c 100644
--- a/src/gallium/frontends/wgl/stw_pixelformat.c
+++ b/src/gallium/frontends/wgl/stw_pixelformat.c
@@ -252,7 +252,17 @@ add_color_format_variants(const struct stw_pf_color_info *color_formats,
* to force all pixel formats to have a particular number of samples.
*/
{
- const char *samples= getenv("SVGA_FORCE_MSAA");
+ const char *samples = getenv("WGL_FORCE_MSAA");
+ if (!samples) {
+ static bool warned = false;
+ samples = getenv("SVGA_FORCE_MSAA");
+ if (samples && !warned) {
+ fprintf(stderr, "*** SVGA_FORCE_MSAA is deprecated; "
+ "use WGL_FORCE_MSAA instead ***\n");
+ warned = true;
+ }
+ }
+
if (samples)
force_samples = atoi(samples);
}
More information about the mesa-commit
mailing list