To the maintainer of Mesa's "span.c" file,

While making some changes to Mesa for my own use, I stumbled across what
I believe is a bug in span.c (version 3.1 of Mesa):

The following code snippet appears twice:

   if (primitive==GL_BITMAP || (ctx->RasterMask & MULTI_DRAW_BIT)) {
      /* must make a copy of the colors since they may be modified */
      MEMCPY(rgbaBackup, rgbaIn, 4 * sizeof(GLubyte));
      rgba = rgbaBackup;
   }

I believe it should be:

   if (primitive==GL_BITMAP || (ctx->RasterMask & MULTI_DRAW_BIT)) {
      /* must make a copy of the colors since they may be modified */
      MEMCPY(rgbaBackup, rgbaIn, 4 * n * sizeof(GLubyte));
      rgba = rgbaBackup;
   }

The difference is the multiply by 'n'.  Without this change, the
MULTI_DRAW_BIT case won't work as intended.  The BITMAP case might be
OK without the change; I'm not as familiar with the BITMAP code paths
in Mesa.

Bill


_______________________________________________
Mesa-bug maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-bug


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to