Commit f58f4263 authored by anholt's avatar anholt
Browse files

Fix SiS DRI visual configs with guidance from idr:

* Fill in the size/mask values for the framebuffer by hand, because the
  automatic filling didn't seem to be complete.  Matches other drivers.
* Don't use an alpha channel in accum if framebuffer lacks alpha.
* Mark visuals with accum buffer as GLX_SLOW_CONFIG.
parent 0eafc97b
......@@ -132,18 +132,33 @@ SISInitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].vid = -1;
pConfigs[i].class = -1;
pConfigs[i].rgba = TRUE;
pConfigs[i].redSize = -1;
pConfigs[i].greenSize = -1;
pConfigs[i].blueSize = -1;
pConfigs[i].redMask = -1;
pConfigs[i].greenMask = -1;
pConfigs[i].blueMask = -1;
pConfigs[i].alphaMask = 0;
if (pScrn->bitsPerPixel == 16) {
pConfigs[i].redSize = 5;
pConfigs[i].greenSize = 6;
pConfigs[i].blueSize = 5;
pConfigs[i].alphaSize = 0;
pConfigs[i].redMask = 0x0000F800;
pConfigs[i].greenMask = 0x000007E0;
pConfigs[i].blueMask = 0x0000001F;
pConfigs[i].alphaMask = 0x00000000;
} else {
pConfigs[i].redSize = 8;
pConfigs[i].greenSize = 8;
pConfigs[i].blueSize = 8;
pConfigs[i].alphaSize = 8;
pConfigs[i].redMask = 0x00FF0000;
pConfigs[i].greenMask = 0x0000FF00;
pConfigs[i].blueMask = 0x000000FF;
pConfigs[i].alphaMask = 0xFF000000;
}
if(accum) {
pConfigs[i].accumRedSize = 16;
pConfigs[i].accumGreenSize = 16;
pConfigs[i].accumBlueSize = 16;
pConfigs[i].accumAlphaSize = 16;
if (pConfigs[i].alphaMask == 0)
pConfigs[i].accumAlphaSize = 0;
else
pConfigs[i].accumAlphaSize = 16;
} else {
pConfigs[i].accumRedSize = 0;
pConfigs[i].accumGreenSize = 0;
......@@ -174,7 +189,10 @@ SISInitVisualConfigs(ScreenPtr pScreen)
}
pConfigs[i].auxBuffers = 0;
pConfigs[i].level = 0;
pConfigs[i].visualRating = GLX_NONE_EXT;
if (pConfigs[i].accumRedSize != 0)
pConfigs[i].visualRating = GLX_SLOW_CONFIG;
else
pConfigs[i].visualRating = GLX_NONE_EXT;
pConfigs[i].transparentPixel = GLX_NONE;
pConfigs[i].transparentRed = 0;
pConfigs[i].transparentGreen = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment