diff options
author | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 23:11:26 +0000 |
---|---|---|
committer | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 23:11:26 +0000 |
commit | 118e17c32d9008d80d418921d49cae046b4a15c8 (patch) | |
tree | bd2883271a5e51afd59e1ad2bf12e1413802eb0d | |
parent | 6c4e6457020ee25557c44f78c229536d59cc32e3 (diff) | |
download | chromium_src-118e17c32d9008d80d418921d49cae046b4a15c8.zip chromium_src-118e17c32d9008d80d418921d49cae046b4a15c8.tar.gz chromium_src-118e17c32d9008d80d418921d49cae046b4a15c8.tar.bz2 |
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
-rw-r--r-- | third_party/mesa/MesaLib/src/mesa/main/macros.h | 8 | ||||
-rw-r--r-- | third_party/mesa/README.chromium | 5 |
2 files changed, 12 insertions, 1 deletions
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! diff --git a/third_party/mesa/README.chromium b/third_party/mesa/README.chromium index 6a38b5c..e8aec51 100644 --- a/third_party/mesa/README.chromium +++ b/third_party/mesa/README.chromium @@ -119,3 +119,8 @@ Later modifications (see chromium.patch): - Added constants for GL_NVX_gpu_memory_info to glext.h - Added constants for GL_EXT_discard_framebuffer to glext.h + +- Disabled the IEEE float optimized UNCLAMPED_FLOAT_TO_UBYTE and + CLAMPED_FLOAT_TO_UBYTE (src/mesa/main/macros.h) in chromium version + of mesa. They produce slightly different results than the + un-optimized versions that are used when DEBUG is defined. |