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