From 25a5ccb63a9e3074b4c8eaf48844877d84ff76bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sun, 18 Jun 2006 15:26:55 +0200 Subject: Prefer visuals with stencil when it's hardware acclerated. Also make the formatting of the if statements consistent. --- src/radeon_dri.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/radeon_dri.c') diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 1e0d544c..b6446590 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; -- cgit v1.2.3