[Mesa-dev] [PATCH 4/5] swrast: use BITFIELD64_BIT() macro to fix MSVC warnings
Brian Paul
brianp at vmware.com
Thu Jan 12 09:49:21 PST 2012
---
src/mesa/swrast/s_aalinetemp.h | 2 +-
src/mesa/swrast/s_context.c | 2 +-
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 d99d9d3..376ef32 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 94b7fe3..06824ea 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 689fe34..e899303 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
}
--
1.7.3.4
More information about the mesa-dev
mailing list