From 118e17c32d9008d80d418921d49cae046b4a15c8 Mon Sep 17 00:00:00 2001 From: "ernstm@chromium.org" Date: Tue, 12 Mar 2013 23:11:26 +0000 Subject: Made Mesa use consistent *_FLOAT_TO_UBYTE conversions. The optimized versions producd slightly different results than the un-optimized versions (used when DEBUG is defined). This caused inconsistent test results. BUG=181712 Review URL: https://chromiumcodereview.appspot.com/12764015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187688 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/mesa/MesaLib/src/mesa/main/macros.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'third_party/mesa/MesaLib/src') diff --git a/third_party/mesa/MesaLib/src/mesa/main/macros.h b/third_party/mesa/MesaLib/src/mesa/main/macros.h index b2ec0ba..ee07011 100644 --- a/third_party/mesa/MesaLib/src/mesa/main/macros.h +++ b/third_party/mesa/MesaLib/src/mesa/main/macros.h @@ -134,7 +134,13 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; *** UNCLAMPED_FLOAT_TO_UBYTE: clamp float to [0,1] and map to ubyte in [0,255] *** CLAMPED_FLOAT_TO_UBYTE: map float known to be in [0,1] to ubyte in [0,255] ***/ -#if defined(USE_IEEE) && !defined(DEBUG) +/* (ernstm): Disabled the IEEE float optimized + * UNCLAMPED_FLOAT_TO_UBYTE and CLAMPED_FLOAT_TO_UBYTE in + * chromium version of mesa. They produce slightly + * different results than the un-optimized versions that are + * used when DEBUG is defined. + */ +#if 0 && defined(USE_IEEE) && !defined(DEBUG) #define IEEE_0996 0x3f7f0000 /* 0.996 or so */ /* This function/macro is sensitive to precision. Test very carefully * if you change it! -- cgit v1.1