summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-12 09:54:04 -0700
committerBrian Paul <[email protected]>2012-01-12 13:02:50 -0700
commit706400f0a7a59bba89eca8e97a1ada45445ee6df (patch)
treeca697e985db3fe5793b99d31f878bbfc1f95eaf4
parentdecd018b992eb0f7f85338ee39083daca04885b6 (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]>
-rw-r--r--src/mesa/swrast/s_aalinetemp.h2
-rw-r--r--src/mesa/swrast/s_context.c2
-rw-r--r--src/mesa/swrast/s_span.c6
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
}