On Fri, 18 Mar 2011 08:02:09 +0000, Chris Wilson <[email protected]> 
wrote:

> A broken implementation of is_pot() prevented the detection of when a
> singular pipe was enabled.

> -     return mask && (mask & -mask) == 0;
> +     return mask && (mask & -mask) == mask;

I think the form

        mask && (mask & (mask - 1)) == 0

is easier to reason about.

But, your fix is also correct as it finds the lowest bit set in 'mask'
and checks to see if that is the same as mask.

Reviewed-by: Keith Packard <[email protected]>

-- 
[email protected]

Attachment: pgpK3403Fm1hC.pgp
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to