mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
st/dri: remove GALLIUM_MSAA and __GL_FSAA_MODE environment variables
Some users don't understand that these variables can break OpenGL. The general is rule is that if an app supports MSAA, you mustn't use GALLIUM_MSAA. For example, if an app has an 8xMSAA FBO and GALLIUM_MSAA=4 is set, resolving the FBO to the back buffer will be rejected which will look like this on all gallium drivers: http://www.phoronix.com/scan.php?page=article&item=amd_radeonsi_msaa The environment variables also have no effect on modern apps like TF2, but there is still a performance hit due to wasted bandwidth and VRAM. In a nutshell, it does more harm than good. Cc: 10.2 10.3 <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
001247d230
commit
8449121971
1 changed files with 0 additions and 35 deletions
|
|
@ -227,37 +227,6 @@ dri_fill_in_modes(struct dri_screen *screen)
|
|||
return (const __DRIconfig **)configs;
|
||||
}
|
||||
|
||||
/* The Gallium way to force MSAA. */
|
||||
DEBUG_GET_ONCE_NUM_OPTION(msaa, "GALLIUM_MSAA", 0);
|
||||
|
||||
/* The NVIDIA way to force MSAA. The same variable is used by the NVIDIA
|
||||
* driver. */
|
||||
DEBUG_GET_ONCE_NUM_OPTION(msaa_nv, "__GL_FSAA_MODE", 0);
|
||||
|
||||
static void
|
||||
dri_force_msaa_visual(struct st_visual *stvis,
|
||||
struct pipe_screen *screen)
|
||||
{
|
||||
int i;
|
||||
int samples = debug_get_option_msaa();
|
||||
|
||||
if (!samples)
|
||||
samples = debug_get_option_msaa_nv();
|
||||
|
||||
if (samples <= 1)
|
||||
return; /* nothing to do */
|
||||
|
||||
/* Choose a supported sample count greater than or equal to samples. */
|
||||
for (i = samples; i <= MSAA_VISUAL_MAX_SAMPLES; i++) {
|
||||
if (screen->is_format_supported(screen, stvis->color_format,
|
||||
PIPE_TEXTURE_2D, i,
|
||||
PIPE_BIND_RENDER_TARGET)) {
|
||||
stvis->samples = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Roughly the converse of dri_fill_in_modes.
|
||||
*/
|
||||
|
|
@ -282,10 +251,6 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
|
|||
if (mode->sampleBuffers) {
|
||||
stvis->samples = mode->samples;
|
||||
}
|
||||
else {
|
||||
/* This must be done after stvis->color_format is set. */
|
||||
dri_force_msaa_visual(stvis, screen->base.screen);
|
||||
}
|
||||
|
||||
switch (mode->depthBits) {
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue