diff options
author | Brian Paul <[email protected]> | 2012-01-12 09:54:04 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-13 10:14:59 -0700 |
commit | d7a4eb331bb177ad9f81d14305b8107a3c9dccfb (patch) | |
tree | 53192cbd4084a9319b47f6da80c53c548e5de470 /src/mesa/swrast | |
parent | ee5b35c568acff1bf5bed537635ff51d725337a6 (diff) |
swrast: use BITFIELD64_BIT() macro to fix MSVC warnings
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 706400f0a7a59bba89eca8e97a1ada45445ee6df)
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_aalinetemp.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_context.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index d99d9d3d904..376ef32d06e 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -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; diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 94b7fe34daa..06824ea2ce9 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -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) diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 689fe34aeaf..e899303537b 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -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 } |