[Piglit] [PATCH piglit v2] teximage-color: Fix un_to_float for 32-bit builds

Neil Roberts neil at linux.intel.com
Thu Sep 18 03:24:09 PDT 2014


Ilia Mirkin <imirkin at 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 :)

- Neil


More information about the Piglit mailing list