summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorJames Benton <jbenton@vmware.com>2012-09-13 16:05:37 +0100
committerJosé Fonseca <jfonseca@vmware.com>2012-11-27 16:24:02 +0000
commit65016646e355c8266136abbb991006c8829a0bc3 (patch)
tree361356a4d750433e62fa0611b99542c9dc26f15a /src/gallium/auxiliary/util
parent978df710f22562ae766b1fe60e8ebf40d20a6e6b (diff)
downloadexternal_mesa3d-65016646e355c8266136abbb991006c8829a0bc3.zip
external_mesa3d-65016646e355c8266136abbb991006c8829a0bc3.tar.gz
external_mesa3d-65016646e355c8266136abbb991006c8829a0bc3.tar.bz2
util/format: Fix bug in float to non-float conversion in u_format_pack.py.
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 0b3a890..565d059 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -383,7 +383,7 @@ def conversion_expr(src_channel,
if dst_channel.norm or dst_channel.type == FIXED:
dst_one = get_one(dst_channel)
if dst_channel.size <= 23:
- value = '(%s * 0x%x)' % (value, dst_one)
+ value = 'util_iround(%s * 0x%x)' % (value, dst_one)
else:
# bigger than single precision mantissa, use double
value = '(%s * (double)0x%x)' % (value, dst_one)