mesa: f5703a54e2f765237e01eef6ddbd019ca6a58e81 (master) Run u_format_test on Windows. Testing util_format_r32_sscaled_pack_rgba_float ... FAILED: 00 00 00 80 obtained 00 00 00 00 expected FAILED: 00 00 00 80 obtained 00 00 00 01 expected FAILED: 00 00 00 80 obtained 00 00 00 ff expected Testing util_format_r32g32_sscaled_pack_rgba_float ... FAILED: 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 obtained 00 00 00 01 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 obtained 00 00 00 ff 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 01 expected FAILED: 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 ff expected Testing util_format_r32g32b32_sscaled_pack_rgba_float ... FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 01 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 ff 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 01 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 ff 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 01 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 ff expected Testing util_format_r32g32b32a32_sscaled_pack_rgba_float ... FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 expected FAILED: 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 obtained 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff expected
These are the results of u_format_test on a 32-bit Windows XP Professional machine. 32-bit MSVC built u_format_test fails. 32-bit Cygwin GCC built u_format_test passes. 32-bit MinGW built u_format_test passes.
Created attachment 54656 [details] [review] Added conversion to float type
I am not entirely sure what is the reason for this behavior but in MSVC 2010 the following code: printf("float: %f\n", (float)(-2147483648)); printf("float: %f\n", (float)(-2147483648.0)); outputs float: 2147483648.000000 float: -2147483648.000000 After I modified the input to CLAMP operation in format_pack functions to have the trailing .0 in case of floats, the problem seems to be solved.
Finally fixed with http://cgit.freedesktop.org/mesa/mesa/commit/?id=d268eac3a9c81febc5efcae7fe6854045bfc5144 . Sorry it took this long.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.