On 09/18/2014 04:24 AM, Neil Roberts wrote:
Ilia Mirkin <imir...@alum.mit.edu> writes:

Just bikeshedding here, but isn't the common way of doing this to just have

(1ULL << bits) - 1

?

Yes, that's probably more clear. One advantage of doing the shift in the
other direction is if we ever end up supporting textures with 64-bit
ints then we would need to do (1ULLL << bits) - 1 but that of course
wouldn't work because there is no ULLL type. But yes, that is entirely
hypothetical and it really doesn't matter that much what we do as long
as it works and I already feel bad for continuing the bike shedding :)

FWIW, rather than using somewhat ambiguous UL, ULL, etc suffixes, one can use a cast like ((uint64_t) 1).

-Brian

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to