swrast: Use BITFIELD64_BIT for arrayAttribs.
authorJose Fonseca <jfonseca@vmware.com>
Wed, 18 Mar 2015 14:25:19 +0000 (14:25 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Wed, 18 Mar 2015 21:51:54 +0000 (21:51 +0000)
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 <brianp@vmware.com>
src/mesa/swrast/s_span.c

index 5d618f0..e304b6b 100644 (file)
@@ -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);
             }