projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
846e38f
)
util: Fix unity value for swizzle 1.
author
José Fonseca
<jfonseca@vmware.com>
Tue, 15 Dec 2009 13:40:13 +0000
(13:40 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Tue, 15 Dec 2009 13:40:13 +0000
(13:40 +0000)
It should be 255 for ubytes, and not 1.
Thanks Michal for spotting this.
src/gallium/auxiliary/util/u_format_access.py
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_format_access.py
b/src/gallium/auxiliary/util/u_format_access.py
index eeb1a9657fd05ce5fdcce2a8f162dee9f290e31b..0b05ddb9312c700911b3073177fb6b1412bbbdd8 100644
(file)
--- a/
src/gallium/auxiliary/util/u_format_access.py
+++ b/
src/gallium/auxiliary/util/u_format_access.py
@@
-325,14
+325,14
@@
def generate_format_read(format, dst_type, dst_native_type, dst_suffix):
elif swizzle == SWIZZLE_0:
value = '0'
elif swizzle == SWIZZLE_1:
- value =
'1'
+ value =
get_one(dst_type)
else:
assert False
elif format.colorspace == 'zs':
if i < 3:
value = 'z'
else:
- value =
'1'
+ value =
get_one(dst_type)
else:
assert False
print ' *dst_pixel++ = %s; /* %s */' % (value, 'rgba'[i])