[Mesa-dev] [PATCH 6/6] swrast: Use BITFIELD64_BIT for arrayAttribs.
Brian Paul
brianp at vmware.com
Wed Mar 18 09:50:17 PDT 2015
On 03/18/2015 10:34 AM, Jose Fonseca wrote:
> 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.
> ---
> 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 5d618f0..e304b6b 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);
> }
>
All six look good to me.
Reviewed-by: Brian Paul <brianp at vmware.com>
This patch (6/6) is a subset of one I still have sitting around related
to http://bugs.freedesktop.org/show_bug.cgi?id=87136
More information about the mesa-dev
mailing list