summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/glcontextmodes.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-11-29 23:01:43 +0000
committerBrian Paul <[email protected]>2005-11-29 23:01:43 +0000
commit96f216565e09032021bafa7a805aa7707777fda1 (patch)
treea6de9f15184ceb91033e60376dc7d41eb058823c /src/mesa/drivers/dri/common/glcontextmodes.c
parent2d8eb9eaf3f39ce001609c39e155ac8ad44605f3 (diff)
assorted fixes for server-side direct rendering (bug 5199)
Diffstat (limited to 'src/mesa/drivers/dri/common/glcontextmodes.c')
-rw-r--r--src/mesa/drivers/dri/common/glcontextmodes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c
index 4bff387ae0a..5e9e352f2c6 100644
--- a/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -157,8 +157,8 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
mode->greenMask = config->greenMask;
mode->blueMask = config->blueMask;
mode->alphaMask = config->alphaMask;
- mode->rgbBits = config->bufferSize;
- mode->indexBits = config->bufferSize;
+ mode->rgbBits = mode->rgbMode ? config->bufferSize : 0;
+ mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0;
mode->accumRedBits = config->accumRedSize;
mode->accumGreenBits = config->accumGreenSize;