From cebc62f1060c815e3b5a1bd3728c3d909db3d2b8 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Wed, 18 Mar 2015 14:25:19 +0000 Subject: [PATCH] swrast: Use BITFIELD64_BIT for arrayAttribs. As VARYING_SLOT_MAX can be bigger than 32. I'll probably stop building swrast with MSVC in the near future, but this seems a real bug regardless. Reviewed-by: Brian Paul --- src/mesa/swrast/s_span.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 5d618f0488a..e304b6b5a3d 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -788,7 +788,7 @@ clip_span( struct gl_context *ctx, SWspan *span ) memmove(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0])) for (i = 0; i < VARYING_SLOT_MAX; i++) { - if (span->arrayAttribs & (1 << i)) { + if (span->arrayAttribs & BITFIELD64_BIT(i)) { /* shift array elements left by 'leftClip' */ SHIFT_ARRAY(span->array->attribs[i], leftClip, n - leftClip); } -- 2.30.2