diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2006-06-18 15:26:55 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-06-18 15:26:55 +0200 |
commit | 25a5ccb63a9e3074b4c8eaf48844877d84ff76bb (patch) | |
tree | 7bf32c5ebea87b3bc1fc804d698b139ef4a2aad4 | |
parent | 8fcc436f19f9c1371295af2d0c45608fb43c584b (diff) |
Prefer visuals with stencil when it's hardware acclerated.
Also make the formatting of the if statements consistent.
-rw-r--r-- | src/radeon_dri.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 1e0d544..b644659 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -163,10 +163,12 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) pConfigs[i].stereo = FALSE; pConfigs[i].bufferSize = 16; pConfigs[i].depthSize = info->depthBits; - if (stencil) + if (pConfigs[i].depthSize == 24 ? (RADEON_USE_STENCIL - stencil) + : stencil) { pConfigs[i].stencilSize = 8; - else + } else { pConfigs[i].stencilSize = 0; + } pConfigs[i].auxBuffers = 0; pConfigs[i].level = 0; if (accum || @@ -247,7 +249,8 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) pConfigs[i].stereo = FALSE; pConfigs[i].bufferSize = 32; pConfigs[i].depthSize = info->depthBits; - if (stencil) { + if (pConfigs[i].depthSize == 24 ? (RADEON_USE_STENCIL - stencil) + : stencil) { pConfigs[i].stencilSize = 8; } else { pConfigs[i].stencilSize = 0; |