summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/common/driverfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/common/driverfuncs.c')
-rw-r--r--src/mesa/drivers/common/driverfuncs.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 9b271f85e9..5c5e17820d 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -264,11 +264,23 @@ _mesa_init_driver_state(GLcontext *ctx)
ctx->Color.BlendDstRGB,
ctx->Color.BlendSrcA, ctx->Color.BlendDstA);
- ctx->Driver.ColorMask(ctx,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ if (ctx->Driver.ColorMaskIndexed) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ ctx->Driver.ColorMaskIndexed(ctx, i,
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
+ }
+ }
+ else {
+ ctx->Driver.ColorMask(ctx,
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
+ }
ctx->Driver.CullFace(ctx, ctx->Polygon.CullFaceMode);
ctx->Driver.DepthFunc(ctx, ctx->Depth.Func);