summaryrefslogtreecommitdiff
path: root/src/radeon_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_dri.c')
-rw-r--r--src/radeon_dri.c9
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;