[Mesa-dev] [PATCH 6/7] translate_sse: Be more specific in comment about loss of precision.

Andreas Hartmetz ahartmetz at gmail.com
Sun Apr 13 13:29:37 PDT 2014


From: Andreas Hartmetz <andreas.hartmetz at kdab.com>

The only loss of precision here due to intrinsic properties of
unsigned int and float.
---
 src/gallium/auxiliary/translate/translate_sse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c
index 03d8276..ca02b7a 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -622,7 +622,7 @@ translate_attr_convert(struct translate_sse *p,
                sse2_punpcklwd(p->func, dataXMM, dataXMM);
                sse2_psrad_imm(p->func, dataXMM, 16);
                break;
-            case 32:           /* we lose precision here */
+            case 32:           /* we lose precision if abs(value) > 2^23 - 1 */
                break;
             default:
                return FALSE;
-- 
1.9.1



More information about the mesa-dev mailing list