Mesa (master): mesa: fix ColorMask array index in _mesa_init_driver_state()

Brian Paul brianp at kemper.freedesktop.org
Thu Aug 11 08:06:07 PDT 2011


Module: Mesa
Branch: master
Commit: 9b8287f8f5398647ced3a52885233d58e548c2b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b8287f8f5398647ced3a52885233d58e548c2b7

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug 11 08:58:08 2011 -0600

mesa: fix ColorMask array index in _mesa_init_driver_state()

This doesn't really make any difference because all the colormasks
are the same upon context set-up, but it makes more sense.

---

 src/mesa/drivers/common/driverfuncs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 7663026..70f8727 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -248,10 +248,10 @@ _mesa_init_driver_state(struct gl_context *ctx)
       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]);
+                                      ctx->Color.ColorMask[i][RCOMP],
+                                      ctx->Color.ColorMask[i][GCOMP],
+                                      ctx->Color.ColorMask[i][BCOMP],
+                                      ctx->Color.ColorMask[i][ACOMP]);
       }
    }
    else {



More information about the mesa-commit mailing list