On Thu, Jun 2, 2011 at 5:18 PM, Benjamin Bellec <b.bel...@gmail.com> wrote:
> But there is an issue, during compilation there is an error (-Wall)
> "warning: right shift count >= width of type [enabled by default]".

This doesn't make any sense since I don't think the unsigned int type
is ever 8 bytes:

> + if (sizeof(unsigned) == 8)
> +            val = (val >> 32) | val;

Also, if you want to check if the value is already a power-of-two,
instead of a case statement for every POT (including 0), just do the
standard is-power-of-two check:

(x & (x - 1)) == 0

(Scroll up a little on the page you cited)

Matt
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to