projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
978df71
)
util/format: Fix bug in float to non-float conversion in u_format_pack.py.
author
James Benton
<jbenton@vmware.com>
Thu, 13 Sep 2012 15:05:37 +0000
(16:05 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Tue, 27 Nov 2012 16:24:02 +0000
(16:24 +0000)
Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/util/u_format_pack.py
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_format_pack.py
b/src/gallium/auxiliary/util/u_format_pack.py
index 0b3a890d59122598f8ca9d10d8d8541023378077..565d059c3e3461b2b364661d011f9c8d420e9566 100644
(file)
--- 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)