util: Fix unity value for swizzle 1.
It should be 255 for ubytes, and not 1. Thanks Michal for spotting this.
This commit is contained in:
parent
846e38f1c3
commit
079b1cf4cf
|
@ -325,14 +325,14 @@ def generate_format_read(format, dst_type, dst_native_type, dst_suffix):
|
||||||
elif swizzle == SWIZZLE_0:
|
elif swizzle == SWIZZLE_0:
|
||||||
value = '0'
|
value = '0'
|
||||||
elif swizzle == SWIZZLE_1:
|
elif swizzle == SWIZZLE_1:
|
||||||
value = '1'
|
value = get_one(dst_type)
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False
|
||||||
elif format.colorspace == 'zs':
|
elif format.colorspace == 'zs':
|
||||||
if i < 3:
|
if i < 3:
|
||||||
value = 'z'
|
value = 'z'
|
||||||
else:
|
else:
|
||||||
value = '1'
|
value = get_one(dst_type)
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False
|
||||||
print ' *dst_pixel++ = %s; /* %s */' % (value, 'rgba'[i])
|
print ' *dst_pixel++ = %s; /* %s */' % (value, 'rgba'[i])
|
||||||
|
|
Loading…
Reference in New Issue