[Mesa-dev] [PATCH] Fixed bug in unclamped float to ubyte conversion.

2013-05-12 Thread Manfred Ernst
Problem: The IEEE float optimized version of UNCLAMPED_FLOAT_TO_UBYTE in macros.h computed incorrect results for inputs in the range 0x3f7f (=0.99609375) to 0x3f7f7f80 (=0.99803924560546875) inclusive. 0x3f7f7f80 is the IEEE float value that results in 254.5 when multiplied by 255. With roun

[Mesa-dev] [PATCH] Fixed bug in unclamped float to ubyte conversion.

2013-05-10 Thread Manfred Ernst
Problem: The IEEE float optimized version of UNCLAMPED_FLOAT_TO_UBYTE in macros.h computed incorrect results for inputs in the range 0x3f7f (=0.99609375) to 0x3f7f7f80 (=0.99803924560546875) inclusive. 0x3f7f7f80 is the IEEE float value that results in 254.5 when multiplied by 255. With roun