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@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:09:51 +01:00
committed by Marge Bot
parent 94706601fa
commit 116553b554
2 changed files with 21 additions and 1 deletions

View File

@@ -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
----------------------------------------------------

View File

@@ -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);
}