swrast: use BITFIELD64_BIT() macro to fix MSVC warnings
authorBrian Paul <brianp@vmware.com>
Thu, 12 Jan 2012 16:54:04 +0000 (09:54 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 12 Jan 2012 20:02:50 +0000 (13:02 -0700)
NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/swrast/s_aalinetemp.h
src/mesa/swrast/s_context.c
src/mesa/swrast/s_span.c

index d99d9d3d904cc880ba18d1f6b4c1f0a81a02b9dd..376ef32d06edb0de598a94985c02a78306235ab7 100644 (file)
@@ -175,7 +175,7 @@ NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
                              line.attrPlane[attr][c]);
             }
          }
-         line.span.arrayAttribs |= (1 << attr);
+         line.span.arrayAttribs |= BITFIELD64_BIT(attr);
          if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0) {
             const GLuint u = attr - FRAG_ATTRIB_TEX0;
             const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;
index 94b7fe34daa8473f92103b93174b814dedf33920..06824ea2ce97bf04991a7acf0599377c9f3c697e 100644 (file)
@@ -531,7 +531,7 @@ _swrast_update_active_attribs(struct gl_context *ctx)
    {
       GLuint i, num = 0;
       for (i = 0; i < FRAG_ATTRIB_MAX; i++) {
-         if (attribsMask & (1 << i)) {
+         if (attribsMask & BITFIELD64_BIT(i)) {
             swrast->_ActiveAttribs[num++] = i;
             /* how should this attribute be interpolated? */
             if (i == FRAG_ATTRIB_COL0 || i == FRAG_ATTRIB_COL1)
index 689fe34aeaf646fad337b68bdf2444c1914317bc..e899303537bf59a45e7da1b2e163e47439ccdbe6 100644 (file)
@@ -175,7 +175,7 @@ interpolate_active_attribs(struct gl_context *ctx, SWspan *span,
    attrMask &= ~span->arrayAttribs;
 
    ATTRIB_LOOP_BEGIN
-      if (attrMask & (1 << attr)) {
+      if (attrMask & BITFIELD64_BIT(attr)) {
          const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3];
          GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3];
          const GLfloat dv0dx = span->attrStepX[attr][0];
@@ -199,8 +199,8 @@ interpolate_active_attribs(struct gl_context *ctx, SWspan *span,
             v3 += dv3dx;
             w += dwdx;
          }
-         ASSERT((span->arrayAttribs & (1 << attr)) == 0);
-         span->arrayAttribs |= (1 << attr);
+         ASSERT((span->arrayAttribs & BITFIELD64_BIT(attr)) == 0);
+         span->arrayAttribs |= BITFIELD64_BIT(attr);
       }
    ATTRIB_LOOP_END
 }