Since the idea is to just expand or shrink the bit width but not otherwise do
conversion we also need to adjust the sign bit according to src, otherwise
the conversion code will incorrectly clamp the values. (Since this only works
for casting to ordinary floats the norm and fixed bits should always be fine.)
This fixes the remaining piglit attribs GL3 failures.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
if (pure_integer) {
assert(dst_type.floating);
tmp_type.floating = 0;
+ tmp_type.sign = src_type.sign;
}
/* Convert to correct format */