summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savageioctl.c
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-02-12 14:35:17 +0000
committerFelix Kuehling <[email protected]>2005-02-12 14:35:17 +0000
commited9119b72a62cca2cbbf36ecca0efc7f7d6c1535 (patch)
tree8073ba9f2fd167f7d50a10309e06f6c558f680b1 /src/mesa/drivers/dri/savage/savageioctl.c
parent0872b85b1ea97850d42972c80c2d3350d5ae2d44 (diff)
Make glean's masked clear test pass.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savageioctl.c')
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index cd25b620f0d..707fcb6ffb5 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -32,6 +32,7 @@
#include "dd.h"
#include "context.h"
#include "swrast/swrast.h"
+#include "colormac.h"
#include "mm.h"
#include "savagecontext.h"
@@ -346,8 +347,21 @@ static void savageDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
clearDepth = (GLuint) ((1.0 - ctx->Depth.Clear) * DEPTH_SCALE_24);
}
- colorMask = *((GLuint *) &ctx->Color.ColorMask);
+ colorMask = 0;
depthMask = 0;
+ switch (imesa->savageScreen->cpp) {
+ case 2:
+ colorMask = PACK_COLOR_565(ctx->Color.ColorMask[0],
+ ctx->Color.ColorMask[1],
+ ctx->Color.ColorMask[2]);
+ break;
+ case 4:
+ colorMask = PACK_COLOR_8888(ctx->Color.ColorMask[3],
+ ctx->Color.ColorMask[2],
+ ctx->Color.ColorMask[1],
+ ctx->Color.ColorMask[0]);
+ break;
+ }
flags = 0;